]> granicus.if.org Git - mutt/log
mutt
5 years agoCheck the base64 decoding retval in auth_gss.
Kevin McCarthy [Wed, 13 Feb 2019 03:04:28 +0000 (19:04 -0800)]
Check the base64 decoding retval in auth_gss.

Abort if the value is not decodable.

5 years agoChange auth_gss to to use buffers and the buffer pool.
Kevin McCarthy [Wed, 13 Feb 2019 00:41:07 +0000 (16:41 -0800)]
Change auth_gss to to use buffers and the buffer pool.

Ticket #100 revealed that even a bufsize of 8192 isn't guaranteed to
be big enough.  Convert those large buffers to use the buffer pool
instead.

5 years agoAdd mutt_buffer helpers for base64 conversion.
Kevin McCarthy [Tue, 12 Feb 2019 23:58:13 +0000 (15:58 -0800)]
Add mutt_buffer helpers for base64 conversion.

Add mutt_buffer_from_base64() mutt_buffer_to_base64() to help with
transitioning to buffers.

5 years agoAdd mutt_buffer_len() helper.
Kevin McCarthy [Tue, 12 Feb 2019 23:48:09 +0000 (15:48 -0800)]
Add mutt_buffer_len() helper.

5 years agoUpdated French translation.
Vincent Lefevre [Thu, 7 Feb 2019 22:48:09 +0000 (23:48 +0100)]
Updated French translation.

5 years agoCreate <group-chat-reply> function.
Kevin McCarthy [Wed, 6 Feb 2019 22:29:42 +0000 (14:29 -0800)]
Create <group-chat-reply> function.

This function differs from <group-reply> only in that it preserves To
recipients in the original email as To recipients in the reply.

The merits of this function aren't without controversy; therefore it
is left unbound by default.  Those who care about such things are free
to bind it.

Combine reply operation handlers in the pager and curs_main, since the
code was the same with the exception of the flags used.

5 years agoUpdated French translation.
Vincent Lefevre [Wed, 6 Feb 2019 12:58:42 +0000 (13:58 +0100)]
Updated French translation.

5 years agocorrected typo from dad0eb255fddbef5f14772b85b32acf6f2ca7996
Vincent Lefevre [Wed, 6 Feb 2019 12:53:30 +0000 (13:53 +0100)]
corrected typo from dad0eb255fddbef5f14772b85b32acf6f2ca7996

5 years agoAdd an error message for <descend-directory>.
Kevin McCarthy [Sat, 2 Feb 2019 23:35:34 +0000 (15:35 -0800)]
Add an error message for <descend-directory>.

Don't allow the operation on a non-directory.  Print a message
indicating it's not a directory.

5 years agoSeparate out op variable in the browser.
Kevin McCarthy [Sat, 2 Feb 2019 23:03:03 +0000 (15:03 -0800)]
Separate out op variable in the browser.

The i variable is used in several places and scopes as a temporary
index variable, but is also used to record the current operation.
Separate them out to make the code less confusing.

5 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 1 Feb 2019 20:52:58 +0000 (12:52 -0800)]
Merge branch 'stable'

5 years agoautomatic post-release commit for mutt-1.11.3 mutt-1-11-3-rel
Kevin McCarthy [Fri, 1 Feb 2019 20:41:23 +0000 (12:41 -0800)]
automatic post-release commit for mutt-1.11.3

5 years agoUpdate UPDATING file for 1.11.3 release.
Kevin McCarthy [Fri, 1 Feb 2019 20:34:19 +0000 (12:34 -0800)]
Update UPDATING file for 1.11.3 release.

5 years agoAllow descending into maildir and mh directories in file browser
Corey Minyard [Thu, 31 Jan 2019 23:57:57 +0000 (17:57 -0600)]
Allow descending into maildir and mh directories in file browser

Some (maybe most) IMAP mail systems allow folders to be nested inside
folders, so you can have, say, an Inbox with more folders inside it.
However, in the file browser, mutt will only open a maildir/mh
directory as a mailbox, there is no way to get to the child mailboxes.

This change adds a function <descend-directory> that forces mutt to
descend into the directory.  It is unbound by default.

Signed-off-by: Corey Minyard <minyard@acm.org>
5 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 25 Jan 2019 02:51:55 +0000 (18:51 -0800)]
Merge branch 'stable'

5 years agoShow top-level decoded smime text/plain parts.
Kevin McCarthy [Fri, 25 Jan 2019 02:28:27 +0000 (18:28 -0800)]
Show top-level decoded smime text/plain parts.

Commit 331d9d5a attempted to fix a problem with an attachment having
extension .p7m.  The attachment menu tried to decode and failed, and
the part ended up being replaced by a bogus text/plain part.

The problem is that crypt_smime_decrypt_mime() returns a text/plain
part if the decode fails, meaning we can't distinguish failure from
success in this case.

As a compromise, only use a text/plain resulting from a single
top-level application_smime part.  This will allow for the case of an
text/plain encoded email, but won't end up hiding attachments that
were not decoded.

5 years agoSimplify nested smime handling in the attachment menu.
Kevin McCarthy [Thu, 24 Jan 2019 23:19:36 +0000 (15:19 -0800)]
Simplify nested smime handling in the attachment menu.

Since changeset 2fd6f99b allows nested encryption handling, there is
no need to deal with the nesting directly.  Instead, just recursive as
with other nested handling.

5 years agoMerge branch 'stable'
Kevin McCarthy [Thu, 24 Jan 2019 23:07:36 +0000 (15:07 -0800)]
Merge branch 'stable'

5 years agoImprove attachment menu for s/mime parts. (closes #113)
Kevin McCarthy [Thu, 24 Jan 2019 22:15:33 +0000 (14:15 -0800)]
Improve attachment menu for s/mime parts. (closes #113)

Don't prompt for passphrase or getkeys, or set the ENCRYPT flag, for
OPAQUE types.

Don't recurse on "text" output from decrypt_mime().  There is no
reason to recurse on a text type.  Additionally, the
mutt_read_mime_header() will return an empty text type even if the
decode doesn't generate mime output.  In those cases, we want to show
the original attachment.

5 years agoMerge branch 'stable'
Kevin McCarthy [Tue, 22 Jan 2019 03:45:28 +0000 (19:45 -0800)]
Merge branch 'stable'

5 years agoFix tunnels to also retry and write full buffer.
Kevin McCarthy [Tue, 22 Jan 2019 03:43:08 +0000 (19:43 -0800)]
Fix tunnels to also retry and write full buffer.

Change the tunnel_socket_read() and tunnel_socket_write() as the raw
sockets were adjusted in the previous commit.  Retry on EINTR, and
complete a full write so all the implementations have the same behavior.

5 years agoMerge branch 'stable'
Kevin McCarthy [Mon, 21 Jan 2019 23:34:46 +0000 (15:34 -0800)]
Merge branch 'stable'

5 years agoFix raw socket read/write to follow expected behavior.
Kevin McCarthy [Mon, 21 Jan 2019 23:19:08 +0000 (15:19 -0800)]
Fix raw socket read/write to follow expected behavior.

The mutt_sasl.c code expects conn_write() to write the entire buffer.
This is inconsistent with mutt_socket.c, but since other conn_write()
implementations guarantee this, change raw_socket_write() to do so too
for now.

Also, update reading and writing to loop on EINTR, as gnutls does.
They won't return EAGAIN or EWOULDBLOCK because we don't mark sockets
as non-blocking.

5 years agoRemove mutt_socket_read().
Kevin McCarthy [Mon, 21 Jan 2019 22:16:13 +0000 (14:16 -0800)]
Remove mutt_socket_read().

It is not used anywhere in the code.

Additionally, it does not interact correctly with
mutt_socket_readchar() and mutt_socket_readln_d(), which use an
internal input buffer: conn->inbuf.

If reading a specific chunksize is needed in future, the function can
be easily recreated to use the inbuf.

5 years agoMerge branch 'stable'
Kevin McCarthy [Mon, 21 Jan 2019 20:11:27 +0000 (12:11 -0800)]
Merge branch 'stable'

5 years agoConvert to use gitlab registry image ubuntu:18.04.
Kevin McCarthy [Fri, 30 Nov 2018 23:12:47 +0000 (15:12 -0800)]
Convert to use gitlab registry image ubuntu:18.04.

The gitlab registry image is built using the Dockerfile in
muttmua/docker-images/tree/master/ubuntu/18.04/

Turn off the scan-build-5.0.  I never look at those reports and they
run very slowly.

Also, for now just compile for gnutls, to speed up the check further.

(cherry picked from commit f34cb1fb8468f74894818343dd8d95da5c0c640d)

5 years agoMerge branch 'stable'
Kevin McCarthy [Mon, 21 Jan 2019 20:02:54 +0000 (12:02 -0800)]
Merge branch 'stable'

5 years agoFix gnutls tls_socket_write() to properly retry.
Kevin McCarthy [Mon, 21 Jan 2019 19:56:04 +0000 (11:56 -0800)]
Fix gnutls tls_socket_write() to properly retry.

Retry on GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED.  This prevents an
aborted send due to a SIGWINCH, for instance.

Change tls_socket_read() to follow the same flow.  Don't bother
checking gnutls_error_is_fatal() because return codes besides AGAIN
and INTERRUPTED end up closing the connection regardless.  (We don't
handle handshakes and negotations during send/receive).

5 years agoChange $pgp_use_gpg_agent to default set.
Kevin McCarthy [Sat, 19 Jan 2019 23:23:32 +0000 (15:23 -0800)]
Change $pgp_use_gpg_agent to default set.

GnuPG 2.1.0, released in 2014-11-06, automatically spawns an agent.
After 4+ years, it has reached wide enough usage to merit changing the
default.

5 years agoMerge branch 'stable'
Kevin McCarthy [Sat, 19 Jan 2019 05:01:09 +0000 (21:01 -0800)]
Merge branch 'stable'

5 years agoUpdate the muttrc man page with added commands.
Kevin McCarthy [Sat, 19 Jan 2019 04:46:07 +0000 (20:46 -0800)]
Update the muttrc man page with added commands.

Add the "color compose", index-format-hook, and echo commands.

Add the HMS relative date units.

5 years agoMerge branch 'stable'
Kevin McCarthy [Sat, 19 Jan 2019 03:46:33 +0000 (19:46 -0800)]
Merge branch 'stable'

5 years agoWrap ssl init calls for LibreSSL too.
Kevin McCarthy [Thu, 10 Jan 2019 17:56:41 +0000 (09:56 -0800)]
Wrap ssl init calls for LibreSSL too.

It looks like LibreSSL does not perform automatic initialization of
the library and error strings.

Since LibreSSL defines OPENSSL_VERSION_NUMBER as a "version 2",
add a check if LIBRESSL_VERSION_NUMBER is defined and call the
initialization functions for that case.

5 years agoUpdated date of the mutt(1) man page.
Vincent Lefevre [Fri, 18 Jan 2019 12:59:05 +0000 (13:59 +0100)]
Updated date of the mutt(1) man page.

5 years agoUpdated date of the muttrc(5) man page.
Vincent Lefevre [Fri, 18 Jan 2019 12:57:20 +0000 (13:57 +0100)]
Updated date of the muttrc(5) man page.

5 years agoAdd attributes support on color declarations
Muh Muhten [Tue, 15 Jan 2019 06:17:02 +0000 (01:17 -0500)]
Add attributes support on color declarations

color now accepts zero or more attributes words before the foreground.

Also more or less resolves the issue that setting the color of an object
which defaults to underline/reverse is irreversible.

6 years agoMerge branch 'stable'
Kevin McCarthy [Thu, 10 Jan 2019 17:45:13 +0000 (09:45 -0800)]
Merge branch 'stable'

6 years agomx_open_mailbox: provide output buffer to realpath(3)
Fabian Groffen [Thu, 10 Jan 2019 15:03:02 +0000 (16:03 +0100)]
mx_open_mailbox: provide output buffer to realpath(3)

Starting with POSIX.1.2008 resolved_path can be NULL.
Systems implementing a standard before that crash.  Example of such
system is Mac OS X 10.5, the last version running on PowerPC hardware.

Since this is the only occurrance of the realpath(3) function in Mutt,
instead of wrapping it, just adjust this invocation.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
6 years agoMerge branch 'stable'
Kevin McCarthy [Tue, 8 Jan 2019 21:10:06 +0000 (13:10 -0800)]
Merge branch 'stable'

6 years agoFix compilation with LibreSSL <2.7.0. (closes #112)
Stefan Strogin [Tue, 8 Jan 2019 19:18:38 +0000 (21:18 +0200)]
Fix compilation with LibreSSL <2.7.0. (closes #112)

(cherry picked from commit 9c9bea5e04e2a562017af0ac7a27b1b0e00e8907)

6 years agoFix compilation with LibreSSL <2.7.0. (closes #112)
Stefan Strogin [Tue, 8 Jan 2019 19:18:38 +0000 (21:18 +0200)]
Fix compilation with LibreSSL <2.7.0. (closes #112)

6 years agoMerge branch 'stable'
Kevin McCarthy [Tue, 8 Jan 2019 01:49:27 +0000 (17:49 -0800)]
Merge branch 'stable'

6 years agoautomatic post-release commit for mutt-1.11.2 mutt-1-11-2-rel
Kevin McCarthy [Tue, 8 Jan 2019 01:39:19 +0000 (17:39 -0800)]
automatic post-release commit for mutt-1.11.2

6 years agoAdd UPDATING notes for 1.11.2 release.
Kevin McCarthy [Tue, 8 Jan 2019 01:26:53 +0000 (17:26 -0800)]
Add UPDATING notes for 1.11.2 release.

6 years agoFix mkdtemp() random signedness
Eike Rathke [Sat, 5 Jan 2019 21:54:26 +0000 (22:54 +0100)]
Fix mkdtemp() random signedness

time_t return of time() may be signed 32-bit and in that case
probably will roll over in the year 2038 and yield a negative
value; signedness was propagated in the XOR operation to the
'value' and then 'v' variables. The 'v % 62' operation then would
had resulted in a negative value and LETTER[v%62] would had
accessed an arbitrary data location.

The same could had happened if the static long 'value' variable
after a very long run time contained a sufficiently large value to
which the time^pid value added resulted in a wrap / roll-over to a
negative value.

Using unsigned long types for 'value' and 'v' and casting time_t
to unsigned long cures all this.

6 years agoMerge branch 'stable'
Kevin McCarthy [Sat, 5 Jan 2019 21:29:11 +0000 (13:29 -0800)]
Merge branch 'stable'

6 years agoUpdate copyright for the next stable release.
Kevin McCarthy [Sat, 5 Jan 2019 21:25:38 +0000 (13:25 -0800)]
Update copyright for the next stable release.

6 years agoFix a few indenting issues.
Kevin McCarthy [Sat, 5 Jan 2019 20:37:16 +0000 (12:37 -0800)]
Fix a few indenting issues.

These are mostly the result of making the formatting changes commit
after the indent changes commit.

6 years agoClean up formatting.
Kevin McCarthy [Sat, 5 Jan 2019 02:45:01 +0000 (18:45 -0800)]
Clean up formatting.

Add spaces after if, else, while, for, switch.

Unify the brace placement style.  The vast majority of the code uses
Allman style so convert the relatively few K&R braces over.

6 years agoClean up code indentation.
Kevin McCarthy [Fri, 4 Jan 2019 03:58:18 +0000 (19:58 -0800)]
Clean up code indentation.

These are mostly automated changes corresponding to the emacs
settings:
  (c-set-style "linux")
  (setq c-basic-offset 2)
  (c-set-offset 'case-label '+)

Most of the code follows the convention:
  (add-to-list 'c-cleanup-list 'space-before-funcall)
but this is not enforced by this indentation cleanup.

Also, I personally dislike tabs, so I have:
  (setq-default indent-tabs-mode nil)
in my own configuration.  However I have no desire to change every line
just for that effect.  So this cleanup does nothing about the mix issue.

Some of the secondary files (e.g. regex.c) have been skipped.

I've also skipped crypt-gpgme.c, because I need to think about that
file.  Werner Koch and the GnuPG team contributed most it, and it
follows the Gnu indentation settings.  It should probably be made
uniform with Mutt, but I don't want to discourage future GnuPG
contribution to the file.

I manually reverted a few unsightly cleanups, and added a few tweeks
when I saw things that could be improved.

6 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 4 Jan 2019 19:22:18 +0000 (11:22 -0800)]
Merge branch 'stable'

6 years agoFix mkdtemp.c implementation.
Kevin McCarthy [Fri, 4 Jan 2019 19:20:05 +0000 (11:20 -0800)]
Fix mkdtemp.c implementation.

Two statements were indented on the same line under a for statement.
The second one would not be included in the loop, only being executed
after the loop finishes.

This is obviously an error, as it modifies the LETTERS entry being
used.

6 years agoSleep $sleep_time after displaying "mail sent" message.
Kevin McCarthy [Tue, 1 Jan 2019 19:24:11 +0000 (11:24 -0800)]
Sleep $sleep_time after displaying "mail sent" message.

In case returning the index displays some kind of error right away, to
give time to see the success message.

6 years agoRemove trailing whitespace.
Kevin McCarthy [Tue, 1 Jan 2019 00:06:53 +0000 (16:06 -0800)]
Remove trailing whitespace.

The result of
  find . -name "*.[ch]" -exec emacs -batch {} \
    --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;

6 years agoRemove unused MUTT_FORMAT_MAKEPRINT flag.
Kevin McCarthy [Mon, 31 Dec 2018 23:39:04 +0000 (15:39 -0800)]
Remove unused MUTT_FORMAT_MAKEPRINT flag.

The code in mutt_FormatString() that was using it was commented out 19
years ago.

6 years agoRemove dead code.
Kevin McCarthy [Mon, 31 Dec 2018 22:19:44 +0000 (14:19 -0800)]
Remove dead code.

Most of these have been "#if 0" out for 10-20 years.  Any utility in
keeping them around is miniscule at this point.

There are a few other "#if 0" in the code, but I've kept them for now.
Some are utility functions that are not used, but I think still may
have some documentation value.

6 years agoFix config variable order.
Kevin McCarthy [Sat, 29 Dec 2018 23:13:15 +0000 (15:13 -0800)]
Fix config variable order.

6 years agoRespect ignore for the protected subject display.
Kevin McCarthy [Sat, 29 Dec 2018 21:50:00 +0000 (13:50 -0800)]
Respect ignore for the protected subject display.

6 years agoColor protected subject as a header in the pager.
Kevin McCarthy [Sat, 29 Dec 2018 21:20:03 +0000 (13:20 -0800)]
Color protected subject as a header in the pager.

6 years agoAdd $crypt_protected_headers_save.
Kevin McCarthy [Thu, 27 Dec 2018 20:05:43 +0000 (12:05 -0800)]
Add $crypt_protected_headers_save.

Setting this option will save the protected header back into the
clear-text message headers.  This improves
usability (searching/limiting/replying) when reopening a mailbox
without header cache.  However, it is a security trade-off, so
defaults off and strongly warns about what it is doing in the documentation.

6 years agoChange x-label editing flag to be in the envelope.
Kevin McCarthy [Wed, 26 Dec 2018 03:52:53 +0000 (19:52 -0800)]
Change x-label editing flag to be in the envelope.

Handle like In-Reply-To and References editing.  Change the flag
setting to be inside mutt_copy_header().

The resetting of the changed flag occurs explicitly in the imap and
maildir/mh sync_mailbox code.  It occurs for mbox in the
mx_update_tables() call in mx_sync_mailbox().

6 years agoCreate envelope->changed to mark all field changes.
Kevin McCarthy [Wed, 26 Dec 2018 03:24:08 +0000 (19:24 -0800)]
Create envelope->changed to mark all field changes.

In subsequent commits, we're going to add the x-label and subject
headers changed flags into the envelope.  To avoid the list of checks
exploding everywhere, just use a single field to check and reset those
values.

Several places in the code are checking for a null header->env.  I
wasn't aware this was possible, so I've added todo notes to track down
when this occurs.

6 years agoLight colors: do not do the + 8 on negative values, such as COLOR_DEFAULT.
Vincent Lefevre [Sat, 29 Dec 2018 19:08:26 +0000 (20:08 +0100)]
Light colors: do not do the + 8 on negative values, such as COLOR_DEFAULT.

6 years agoAdded support for the "light" color prefix (in addition to "bright").
Vincent Lefevre [Sat, 29 Dec 2018 18:37:57 +0000 (19:37 +0100)]
Added support for the "light" color prefix (in addition to "bright").

At the same time, restrict the advance by 8 to colors in the range 0-7
and no longer use the blink attribute to emulate light background colors
in some terminals (e.g. linux console and rxvt), as this is really blink
in other terminals (e.g. xterm); light background colors can still be
obtained by choosing a proper $TERM value (tested with linux console,
using TERM=linux-16color, and rxvt).

6 years agoUpdated French translation.
Vincent Lefevre [Sat, 29 Dec 2018 17:17:43 +0000 (18:17 +0100)]
Updated French translation.

6 years agospelling consistency
Vincent Lefevre [Sat, 29 Dec 2018 17:03:27 +0000 (18:03 +0100)]
spelling consistency

6 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 28 Dec 2018 23:53:15 +0000 (15:53 -0800)]
Merge branch 'stable'

6 years agoMake a copy of x_label before encoding it for updates.
Kevin McCarthy [Fri, 28 Dec 2018 23:43:51 +0000 (15:43 -0800)]
Make a copy of x_label before encoding it for updates.

This isn't actually a bug.  Context->label_hash strdups the keys, so
we are safe from dangling references.  However, the subj_hash uses
direct references, so to keep things consistent and safe, make a copy
and encode that.

6 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 28 Dec 2018 00:27:24 +0000 (16:27 -0800)]
Merge branch 'stable'

6 years agoRestore the xlabel_changed reset.
Kevin McCarthy [Fri, 28 Dec 2018 00:24:27 +0000 (16:24 -0800)]
Restore the xlabel_changed reset.

The cherry pick accidentally obliterated the reset.  That flag is now
located in hdr->env->changed in the branch and is reset properly
elsewhere.  Keep it in place in the stable branch.

6 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 28 Dec 2018 00:16:04 +0000 (16:16 -0800)]
Merge branch 'stable'

6 years agoRfc2047 encode and fold X-Label when writing updates.
Kevin McCarthy [Fri, 28 Dec 2018 00:08:36 +0000 (16:08 -0800)]
Rfc2047 encode and fold X-Label when writing updates.

Also, add a missing "skip" in mutt_copy_hdr() for the non-simple case.

These fixes were backported from the kevin/mutt_protected_header branch.

6 years agoMerge branch 'stable'
Kevin McCarthy [Thu, 27 Dec 2018 23:52:52 +0000 (15:52 -0800)]
Merge branch 'stable'

6 years agoHandle improperly encoded pgp/mime octetstream part.
Kevin McCarthy [Fri, 21 Dec 2018 18:13:17 +0000 (10:13 -0800)]
Handle improperly encoded pgp/mime octetstream part.

Some clients (or even mail servers) improperly encode the octetstream
part.

Thanks to Riccardo Schirone for the original merge request patch.
This commit also handles the attachment menu, and makes the decoding
conditional so it's not done if it isn't necessary.

(cherry picked from commit 450de4637f6590487a073b250da342a1400a3ac3)

6 years agoFree pgpkeylist if the send fails.
Kevin McCarthy [Tue, 25 Dec 2018 00:22:07 +0000 (16:22 -0800)]
Free pgpkeylist if the send fails.

6 years agoRead in protected headers when resuming a postponed message.
Kevin McCarthy [Mon, 24 Dec 2018 23:11:09 +0000 (15:11 -0800)]
Read in protected headers when resuming a postponed message.

6 years agoFinish protected header write support.
Kevin McCarthy [Mon, 24 Dec 2018 00:32:52 +0000 (16:32 -0800)]
Finish protected header write support.

Write out the protected headers when writing the mime header part.

Hide protected subjects with $crypt_protected_headers_subject, for
outgoing, postponed, and fcc'ed messages.

Don't hide in postponed and fcc'ed if $crypt_protected_headers_read
isn't set.

Add a few missing cases where mime_headers needed to be cleaned up on
error.

Remove the protected headers for $fcc_clear.

6 years agoAdd a new mode for mutt_write_rfc822_header().
Kevin McCarthy [Mon, 24 Dec 2018 00:23:02 +0000 (16:23 -0800)]
Add a new mode for mutt_write_rfc822_header().

Convert the mode parameter to an enum, to make the code a bit more readable.

6 years agoAdd config and data structure for protected header write support.
Kevin McCarthy [Sun, 16 Dec 2018 21:15:05 +0000 (13:15 -0800)]
Add config and data structure for protected header write support.

Add config vars $crypt_protected_headers_write (unset by default),
and $crypt_protected_headers_subject.

Store the protected headers during mime_protect().

6 years agoHandle improperly encoded pgp/mime octetstream part.
Kevin McCarthy [Fri, 21 Dec 2018 18:13:17 +0000 (10:13 -0800)]
Handle improperly encoded pgp/mime octetstream part.

Some clients (or even mail servers) improperly encode the octetstream
part.

Thanks to Riccardo Schirone for the original merge request patch.
This commit also handles the attachment menu, and makes the decoding
conditional so it's not done if it isn't necessary.

6 years agoDisplay mail sent message after Fcc finishes.
Kevin McCarthy [Fri, 21 Dec 2018 17:42:26 +0000 (09:42 -0800)]
Display mail sent message after Fcc finishes.

For the case of IMAP, the uploading message would otherwise stay on
the screen.  In any case, it's best to show that message as the last
thing before returning to the index.

Thanks to chdiza for reporting the issue!

6 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 21 Dec 2018 03:52:20 +0000 (19:52 -0800)]
Merge branch 'stable'

6 years agoBackport postpone-encrypt cleanups from master.
Kevin McCarthy [Fri, 21 Dec 2018 03:39:39 +0000 (19:39 -0800)]
Backport postpone-encrypt cleanups from master.

Free the clear content after successfully postponing.

If the fcc fails, properly restore the clear content before returning
to the compose menu.

6 years agoMerge branch 'stable'
Kevin McCarthy [Fri, 21 Dec 2018 02:54:25 +0000 (18:54 -0800)]
Merge branch 'stable'

6 years agoFix compilation without deprecated OpenSSL 1.1 APIs
Rosen Penev [Mon, 3 Dec 2018 00:46:28 +0000 (16:46 -0800)]
Fix compilation without deprecated OpenSSL 1.1 APIs

6 years agoFix flags if mutt_get_postponed() has no messages.
Kevin McCarthy [Thu, 20 Dec 2018 02:48:04 +0000 (18:48 -0800)]
Fix flags if mutt_get_postponed() has no messages.

Flags needs to be reset so memory cleanup is done at the end.

6 years agoMore postpone cleanup.
Kevin McCarthy [Thu, 20 Dec 2018 02:36:19 +0000 (18:36 -0800)]
More postpone cleanup.

Provide an error message if $postponed is not set.

Make sure the clear content is freed for encrypted messages.

If the write_fcc() fails, make sure to restore the clear content.

6 years agoWhen postponing, encode descriptions before encrypting.
Kevin McCarthy [Thu, 20 Dec 2018 01:43:26 +0000 (17:43 -0800)]
When postponing, encode descriptions before encrypting.

This matches the behavior of the normal send process.  I don't think
there is actually an issue here since nothing is sent, but it makes
sense to be consistent.

6 years agoRefactor postpone_message().
Kevin McCarthy [Thu, 20 Dec 2018 00:20:23 +0000 (16:20 -0800)]
Refactor postpone_message().

6 years agoPrompt when mutt_write_fcc() fails.
Kevin McCarthy [Wed, 19 Dec 2018 23:42:24 +0000 (15:42 -0800)]
Prompt when mutt_write_fcc() fails.

Allow the user to retry, specify an alternate mailbox, or skip.

6 years agoMove fcc after send.
Kevin McCarthy [Wed, 19 Dec 2018 22:35:22 +0000 (14:35 -0800)]
Move fcc after send.

6 years agoRefactor save_fcc() function.
Kevin McCarthy [Wed, 19 Dec 2018 22:24:46 +0000 (14:24 -0800)]
Refactor save_fcc() function.

6 years agoAdd rfc2047_encode_envelope helper.
Kevin McCarthy [Sun, 16 Dec 2018 22:23:54 +0000 (14:23 -0800)]
Add rfc2047_encode_envelope helper.

6 years agoAdd protected header received email support.
Kevin McCarthy [Tue, 11 Dec 2018 22:11:30 +0000 (14:11 -0800)]
Add protected header received email support.

Add $crypt_protected_headers_read config variable to enable reading
and updating the index/header cache.

Print protected Subject header in the pager as parts are rendered.

Once opened, update the index, subject hash, and header cache.

6 years agoAdd mx operation save_to_header_cache.
Kevin McCarthy [Sat, 15 Dec 2018 22:49:55 +0000 (14:49 -0800)]
Add mx operation save_to_header_cache.

This will be used when reading protected headers, to store the
encrypted subject in the header cache so it can be searched with.

6 years agoParse and store mime headers in the BODY.
Kevin McCarthy [Mon, 10 Dec 2018 01:41:58 +0000 (17:41 -0800)]
Parse and store mime headers in the BODY.

Don't store the field in the header cache though.

6 years agoFactor out rfc2047_decode_envelope().
Kevin McCarthy [Mon, 10 Dec 2018 03:52:21 +0000 (19:52 -0800)]
Factor out rfc2047_decode_envelope().

6 years agoMerge branch 'stable'
Kevin McCarthy [Thu, 13 Dec 2018 00:14:48 +0000 (16:14 -0800)]
Merge branch 'stable'

6 years agoFix imap_sync_mailbox() hcache leak.
Kevin McCarthy [Thu, 13 Dec 2018 00:10:23 +0000 (16:10 -0800)]
Fix imap_sync_mailbox() hcache leak.

Uploading changed messages to the server ends up overwriting the
hcache.  Add a straightforward fix and a longish explanation comment
for the stable branch fix.

Add a TODO noting a better fix should be done in the master branch in
the future.

6 years agoMerge branch 'stable'
Kevin McCarthy [Wed, 12 Dec 2018 20:41:53 +0000 (12:41 -0800)]
Merge branch 'stable'