Brendan Cully [Sun, 31 Aug 2008 02:59:42 +0000 (19:59 -0700)]
Rework timeout handling to support keepalive in the line editor.
Also allow keepalives of less than $timeout without returning before
$timeout, so people who don't want to be notified of new mail don't
have to be.
Only consider empty files non-existent for buffy's purpose.
According to SUS, the st_size member of struct stat is undefined
for directories. In case a system reports 0, the newly_created
flag will be set for a directory and the magic will be cleared.
If the folder type is cleared, mutt won't check the folder for
new mail and thus will ignore MH and Maildir type folders on
such a fs completely (e.g. the HAMMER fs on DragonFly BSD).
Brendan Cully [Wed, 27 Aug 2008 06:09:13 +0000 (23:09 -0700)]
Properly set the SASL external auth name when using SSL client certs.
Also zero out the account structure before filling it with available
data. Client certificates + SASL EXTERNAL were only working by luck.
Brendan Cully [Mon, 25 Aug 2008 07:52:17 +0000 (00:52 -0700)]
Introduce $imap_pipeline_depth.
This lets users control the number of commands that mutt will queue up
before sending them to the server. Setting this to 0 disables
pipelining, which should close #2892.
Brendan Cully [Mon, 25 Aug 2008 07:16:30 +0000 (00:16 -0700)]
Rework IMAP command queueing to allow pipelining to be disabled.
IDLE handling has been better abstracted, and there are fewer entry
points to the IMAP command issuing machinery. Any commands that
are simply queued may be executed whenever the pipeline fills,
instead of requiring explicit handling in the caller.
Tested on my Cyrus server, but I wouldn't be surprise if this causes
new problems.
Brendan Cully [Sat, 23 Aug 2008 22:21:42 +0000 (15:21 -0700)]
Fix infinite loop with "mutt -", introduced in [31c9e9727d42].
Treats - as a non-option argument. It would be reasonable to treat it
as an error instead.
Aron Griffis [Tue, 19 Aug 2008 20:44:26 +0000 (16:44 -0400)]
Handle -- correctly with or without -a, closes #3097
Prefix optstring with "+" to force POSIX behavior on GNU getopt, and thereby
prevent reordering argv. This allows us to correctly handle mixed addresses,
attachments, options and the double-dash to signal end-of-options.
Rocco Rutte [Thu, 21 Aug 2008 05:33:52 +0000 (07:33 +0200)]
Port certificate host checking from msmtp to mutt.
It supports IDN, wildcards and extracting the hostname from
subject alternative field as well as common name which should
be the same gnutls supports. Closes #3087.
Rocco Rutte [Mon, 18 Aug 2008 08:20:40 +0000 (10:20 +0200)]
Validate charset names for all charset options.
Validation is either done against mutt's table of IANA assigned names or local iconv
implementation (based on the assumption that iconv_open(charset,charset) fails if charset
is unknown to the implementation). Closes #1668.
1. mutt_copy_header incorrectly tests CH_UPDATE to determine whether to write
the In-Reply-To and References headers. CH_UPDATE refers only to Status: and
X-Status:
2. mutt_copy_header ignores CH_NOSTATUS which is supposed to indicate that the
mailbox type doesn't use those headers.
3. mutt_copy_header tests h->env->irt_changed and h->env->refs_changed when it
should be testing CH_UPDATE_IRT and CH_UPDATE_REFS, respectively. Early in
the function this happens:
This means that for most callers, the result is the same, but
mutt_copy_header should be testing the flags because the caller might have
set them explicitly without setting irt_changed/refs_changed.
Rewrite mutt_extract_message_id and change mutt_parse_references to us it. The
parser in mutt_extract_message_id is looser than the old one in
mutt_parse_references; it just looks for <[^\s>]+> and doesn't worry about
@-signs. Additionally it doesn't use strtok, so the input string can be const.
Closes #3090, #1935, #1116 (both the stated bug and the conversation following).
makedoc: Add ".ie" and ".il" to support itemized lists.
Some settings docs use verbatim screen environments to print
lists while support for real lists will make it look nicer:
for docbook use <itemizedlist/>, \(hy for roff and '-' for text.
copy.c and sendlib.c have independent and different implementations of writing
references to a file. Choose the one in sendlib since it's conservative with
mallocs and supports trimming the list.
mutt_copy_header unnecessarily tests the result of each fputc/fputs (well, most
of them anyway, it's not consistent). This obfuscates the code and hides bugs.
Remove these extraneous checks since ferror/feof are checked at the bottom of
the function, and get rid of all the early returns.
Verify hostname in (Open)SSL certificate validation
This is based on the patch by gkloepfer attached to #3087 but passes the
proper connection as argument (avoiding adding hostname to struct
sslsockdata) and validates the hostname even in case OpenSSL cannot find
the local issuer certificate. GnuTLS already supports hostname
checking. Closes #3087.
Prevent some pointers of 'struct body' being saved to hcache
This addresses the hcache safety issue but maybe doesn't fix it
completely, see #2942. This also prevents mutt from crashing when
using a hcache that was synced when syncing the mailbox (updating
changed and fully-parsed messages).
Use realpath() in mutt_pretty_mailbox() for paths that may need it.
This requires to add the buffer size as parameter since the result may
be longer than the original but still fit in the buffer. Closes #2948.
Stub in a gpgme version of extract-keys. It doesn't currently work
right because apparently while gpg on the command line can parse a
whole message, we'll have to do it for gpgme. I really wonder about
the 'ME' part of GPGME sometimes.
Support displaying application/pgp-keys with GPGME.
This was pretty convoluted because GPGME provides no way to examine a
key block without importing it. This code creates a temporary GPG home
in which to import the key in order to display it.
Handle DONTHANDLEPGPKEYS in handler instead of crypto modules.
This lets gpgme and classic pgp share a bit of logic, and unbreaks key
extraction at least for classic PGP.
Bail out of copy if decryption is requested but the desired engine is missing.
This closes #2684, but handling of mixed crypto in a single message
needs more investigation.
Brendan Cully [Sun, 29 Jun 2008 07:31:42 +0000 (00:31 -0700)]
Show more information about problematic SMIME signatures under gpgme.
Also warn if the key is not known to be good. For some reason expired
keys in my environment are not flagged as expired in sig->status or
sig->summary.
Brendan Cully [Sun, 29 Jun 2008 03:33:01 +0000 (20:33 -0700)]
Extract CN from client certificate in gnutls.
Nothing currently uses it, but I suspect we should be using it as the
external auth name in mutt_sasl_client_new.
Brendan Cully [Thu, 26 Jun 2008 05:43:32 +0000 (22:43 -0700)]
Make mutt_copy_message distinguish between fatal and non-fatal errors.
Non-fatal errors should prevent moving messages, since they indicate
data loss. But mutt should still attempt to display them, since being
able to see some attachments is better than nothing.
Also stop printing out non-PGP material in application/pgp
attachments. Closes #2545, #2912.
Brendan Cully [Wed, 25 Jun 2008 06:12:02 +0000 (23:12 -0700)]
Make multipart decoding a little more forgiving.
First, ignore bad content-transfer-encoding in multipart sections.
Second, if an attachment fails to decode, print a warning and continue
instead of giving up on the entire message.