automatic post-release commit for mutt-1.12.2
Update UPDATING file for 1.12.2 release.
Fix mutt_write_mime_body() application/pgp-encrypted handling.
It would blindly overwrite any attachment with that type, as if it
were the version label part of a multipart/encrypted message.
However attachments with extenstion .gpg are labeled that type if
$mime_type_query_command is set to "xdg-mime query filetype". This
would cause the attachment to be overwritten too.
Add a check for a missing body->filename, which should only be the
case for the manually constructed part.
add fallback for inotify_init1
Fix inotify configure test.
AC_CHECK_FUNCS executes "action-if-found" or "action-if-not-found" for
each function in the list. If a system has some but not all of the
functions, both will end up being executed.
This caused a build failure on an older system with exactly that
Change to only define USE_INOTIFY if all functions exist.
Fix accidental fall-through for <quote-char> if aborted.
If <quote-char> was aborted, it was falling through to the
This problem was introduced 19 years when the <transpose-chars> case
was moved below <quote-char>. Previously it fell through to the
default case which beeped.
Don't read or save history if $history_file isn't set.
Make sure mailcap test %s is sanitized.
It's not clear to me if %s is allowed as part of a test field.
However since we are passing the attachment filename, we should
sanitize it first.
Fix compose and edit attachment symlink failure code.
In the case where safe_symlink() fail, mutt prompts to continue, but
did not properly reset the filename to be operated on.
Fix up mutt_view_attachment() to use the same flow as the others, to
allow for easier comparison.
Fix send-mode printing when expand_filename() returns 1.
It will return this when a nametemplate entry already matched the
passed in filename. So this bug required both a print entry and an
already matching nametemplate entry to trigger.
automatic post-release commit for mutt-1.12.1
Update UPDATING file for 1.12.1 release.
Add $fcc_before_send, defaulting unset.
When set, the message will be Fcc'ed the same as sent. $fcc_clear and
$fcc_attach will be ignored. This is because of the difficulty of
unwinding changes, notably Protected Headers, without potentially
Improve $reverse_realname documentation.
Make it clear that, even if set, a missing realname part of the
matching address will be filled in by $realname.
Mention sources for ~p and ~P patterns.
The manual only mentioned alternates. Add $from and local
account/hostname to the list.
The man page implied the only source was alternates. Change to the
same wording as the manual.
Thanks to @rear1019 for pointing out the misleading man page.
Improve imap_append_message() error message handling.
If the rc is IMAP_CMD_BAD, then either idata->buf is stale or an error
message has already been printed (in cmd_handle_untagged()).
Use imap_next_word() to skip over the next two words instead of
directly skipping over SEQLEN, in case the buffer is in a different
format. We don't want to jump over the end of string.
Skip the mutt_error() if there is nothing to print.
Enable the idata->check_status using bit operations.
Commit e3f66d7e fixed dropped new mail notications, removing the
unsetting of idata->reopen IMAP_NEWMAIL_PENDING in imap_cmd_finish()
when an EXPUNGE was processed.
However, imap_cmd_finish() can be called twice by
imap_check_mailbox(). First as part of the imap_exec(), and manually
again just below.
Now that the IMAP_NEWMAIL_PENDING still exists, a second call could
overwrite idata->check_status if both reopen flags were set.
This unfortunately affects update_index(), which behaves differently
I need to change the return value of mx_check_mailbox() in master to
preserve all the bits, so the index can both notify of new mail and
For stable, the best fix is to use bit operators to enable the
check_status flags in imap_cmd_finish() (and cmd_parse_fetch for
flags), and keep the imap_check_mailbox() priority of setting its
return value (it prioritizes IMAP_EXCHANGE_PENDING).
Improve robustness of imap_append_message().
First, check the imap_cmd_step() return value instead of looking at
idata->buf for "OK". If the connection bombed and imap_cmd_step()
returned IMAP_CMD_BAD, the value of idata->buf is stale.
If the server returned "+ OK" for the command continuation request
response, the call to imap_code(idata->buf) would even end up
returning true, despite that the append failed! (See #110, although
at the time of commit I can only hypothesize this is what is
Second, check the status of the writes. flush_buffer() was not
passing the rc from mutt_socket_write_n(), which was further making
the above disaster scenerio possible.
Fix dropped new mail notifications when an EXPUNGE_PENDING is set.
Prior to the fetch_headers rework and introduction of
idata->max_msn (starting around e0376c75), cmd_handle_untagged() was
looking directly at ctx->msgcount, which isn't fixed up until
imap_expunge_mailbox(). At that time, more care had to be taken
inbetween handling the EXPUNGE message and the actual expunge of the
mailbox because of the discrepency between server state and mailbox
idata->max_msn is now decremented during the processing of EXPUNGE and
VANISHED notices from the server, so reflect "current" state. So,
when we receive an EXISTS notice, we no longer need the checks for
expunge state and can always set the NEWMAIL_PENDING flag.
Additionally, fix imap_cmd_finish() to retain the IMAP_NEWMAIL_PENDING
flag after handling an expunge. The expunge does not grab new
messages so dropping the flag would cause mutt to forget the new mail
status until another EXISTS command.
Since this is a stable branch fix, I'm leaving the either/or
processing of expunge versus new mail in imap_cmd_finish(). However,
I don't see why this has to be done in two calls. I may rework that
in master to process an expunge and then the new mail one after the
Remove FORCE prerequisite on version.h.
This is causing package build issues on OpenBSD because of a
difference in make behavior.
In GNU make, it always invoke the 'version.h' target, but then checks
to see if version.h changed before retriggering targets with that
prerequisite. On OpenBSD, invoking the version.h target always
retriggers targets with that prerequisite.
This means that updating the version information now requires a 'make
clean' or manual removal of version.h.