Kevin McCarthy [Sat, 28 Apr 2018 20:21:42 +0000 (13:21 -0700)]
Update pattern documentation.
Note that ~b, ~B, ~h, ~M, and ~X read the message in, and that this
can be much slower.
Change =b, =B, =h table rows to document just the IMAP behavior. The
"=" simple string behavior is already covered below, and makes it less
obvious whether "***)" should be added to those entries in the table.
Break up the simple string and imap server-side matching explanation
into two paragraphs.
Add ~M to the list of patterns you can't use message scoring with.
Add equivalent, if briefer, explanations to the muttrc.man page.
Kevin McCarthy [Mon, 30 Apr 2018 23:17:52 +0000 (16:17 -0700)]
Add more explanation of known vs subscribed lists to manual.
Mention in both the "Mailing Lists" and "Handling Mailing Lists"
sections the difference between known and subscribed mailing lists.
Note that the Mail-Followup-To header is generated if any of the
recipients are known mailing lists. If any of those are subscribed
mailing lists, the sender's address will not be in the header. If all
of them are known (but not subscribed), the sender's address will be
added to the header.
Kevin McCarthy [Thu, 19 Apr 2018 20:51:07 +0000 (13:51 -0700)]
Add $browser_abbreviate_mailboxes.
This allows '=' and '~' mailboxes shortcuts to be turned off in the
browser mailbox list.
The default $sort_browser value of "alpha" uses strcoll(3), which
ignores some punctuation. When using multiple accounts with
dynamically changing values of $folder, this can lead to an
unintuitive sorting order. (See issue #22 for an example.)
This problem came about because of commit 8328ce68, which enabled
mutt_pretty_mailbox() calls for IMAP and POP mailboxes too. The
commit had a valid point about consistency and too-wide mailbox
listings, so I don't really want to revert it.
This option provides an alternative to completely enable/disable the
shortcuts for those who run into an issue.
Kevin McCarthy [Sat, 14 Apr 2018 03:39:35 +0000 (20:39 -0700)]
Improve gss debug printing of status_string.
Commit f52ee2f7 ensured the debug strings were properly '\0'
terminated. However, it did not prevent the strncpy from reading past
the end of the status_string.value data; it simply capped it
afterwards. Improve the code so it only reads up to
status_string.length without overwriting the buffer.
Kevin McCarthy [Sat, 14 Apr 2018 02:03:29 +0000 (19:03 -0700)]
Remove trailing null count from gss_buffer_desc.length field.
RFC 2744 section 3.2.2 clearly states that trailing NULL characters
are not to be included in the length field, and are not to be assumed
to be present in the value field.
Thanks to Greg Hudson, who recently debugged this same issue with
fetchmail, and kindly took the time to look at Mutt's code too.
Kevin McCarthy [Sun, 8 Apr 2018 22:37:09 +0000 (15:37 -0700)]
Rename _regex.h to _mutt_regex.h to avoid name collision on Macs.
On Macs, <regex.h> includes <_regex.h>. Because Mutt defines '-I .'
during compilation, our bundled version of _regex.h was being used
instead of the system one.
I have no idea how it managed to work before, but starting in Xcode
9.3, the differences in struct size and fields started to produce a
crash and other strange behavior.
The real issue is our use of '-I .' during compilation, which allows
our local headers to override system ones. An easier fix for now is
to rename the header.
Many thanks to Charles Diza, Christian Ebert, and Fabian Groffen for
their help trying things out and helping to debug the problem.
Also, a huge thanks to Steve Karmeinsky for allowing me to ssh in to
his Mac so I could track down the underlying issue.
Kevin McCarthy [Mon, 2 Apr 2018 18:30:31 +0000 (11:30 -0700)]
configure: check for tinfo matching ncurses
When we selected ncursesw, look for tinfow as well. Since ncurses-6.1
the binary compatibility between tinfo and tinfow disappeared, resulting
in crashes and other odd behaviour.
This change checks for tinfo or tinfow based on which ncurses we found
to continue with.
https://bugs.gentoo.org/651552
[Thanks to Fabian Groffen for the patch. I made a minor modification
to fall back to tinfo because pre-6.1 systems may not have a tinfow
but still need tinfo to compile.]
Kevin McCarthy [Sat, 24 Mar 2018 22:10:13 +0000 (15:10 -0700)]
Increase account.user/login size to 128.
Like the pass field in commit 52949004, the existing size was
insufficient for the reporter of issue #18. For now, just bump up the
size, but I'll move up looking into making these dynamically sized.
Kevin McCarthy [Fri, 23 Mar 2018 03:23:46 +0000 (20:23 -0700)]
Remove dead code in pgp.c
pgp_extract_keys_from_messages() has been subsumed by
crypt_extract_keys_from_messages(). The function had incorrect
multi-bit flag comparisons, but since it's dead code, remove it
instead.
Kevin McCarthy [Fri, 23 Mar 2018 03:04:46 +0000 (20:04 -0700)]
Fix comparison of flags with multiple bits set.
PGPENCRYPT, PGPKEY, SMIMEENCRYPT, and SMIMEOPAQUE are all combination
flags, with multiple bits set. In a few places these flags were
bitwise-and'ed incorrectly: expecting a non-zero result to indicate
all the bits in the flag were set. Change those to explicitly compare
the result against the original flag.
Kevin McCarthy [Thu, 22 Mar 2018 16:32:31 +0000 (09:32 -0700)]
Fix s/mime non-detached signature handling.
This fix is based on stbuehler's patch from
https://dev.gnupg.org/T2919.
Recent versions of gpgme seem to terminate the connection for a
protocol error. stbuehler's analysis is that this is actually a
gpgme bug, but recreating the context works around the problem.
Kevin McCarthy [Sun, 11 Mar 2018 19:48:46 +0000 (12:48 -0700)]
Add $abort_noattach and $abort_noattach_regexp options.
$abort_noattach_regexp is matched against the body of a message. If
so, the $abort_noattach quadoption is used to prompt whether to abort
sending.
Thanks to Antonio Radici for bringing the original version of the
patch to our attention, which he pulled from
https://github.com/tlvince/pkgbuild/blob/master/mutt-kiss/mutt-attach.patch
This version was rewritten to use a regexp, to fix a few issues, and
to better fit in with Mutt styles and conventions.
Kevin McCarthy [Thu, 22 Feb 2018 02:25:37 +0000 (18:25 -0800)]
Fix is_from() year parsing to abort on year overflow.
Unlike mutt_parse_date(), is_from() was not checking for overflow, and
could end up passing a negative year to mutt_mktime().
It should perhaps be changed to use mutt_atoi(), which does better
range checking, but that requires mutt_atoi() being changed to allow
trailing characters and its callers return value checks being
updated. I'll put that on the todo list.
Kevin McCarthy [Thu, 22 Feb 2018 02:18:53 +0000 (18:18 -0800)]
Cap parsed years at 9999 when converting to time_t.
Large year values, even those less than INT_MAX, apparently can cause
gmtime() and localtime() to return NULL. Mutt needs larger changes
checking and handling those errors, but this will prevent the
immediately triggerable issue.
Kevin McCarthy [Sun, 4 Feb 2018 02:08:28 +0000 (18:08 -0800)]
Add history-search function, bound to ctrl-r.
Create a very basic "search history" functionality in the line editor.
It uses the current input, and searches backward through history. If
there is one match, it immediately uses that otherwise it pops up a
simple menu of matches.
Kevin McCarthy [Thu, 1 Feb 2018 19:10:01 +0000 (11:10 -0800)]
Add stub flea and muttbug scripts back.
It was rightfully pointed out that the removal was too abrupt. These
programs have been around for a long time, and many internet searches
still say to use them for reporting bugs.
Add stub versions which inform to use the gitlab url instead.
Kevin McCarthy [Mon, 22 Jan 2018 03:41:47 +0000 (19:41 -0800)]
Remove useless assignments in add_to_list functions.
The code was probably pulled from some of the header processing
functions, which were in a loop. In those versions, "last" pointed to
a collection of new entries appended, but in these two functions,
updating last just obfuscates the code.
Olaf Hering [Tue, 16 Jan 2018 08:40:06 +0000 (09:40 +0100)]
Split Copyright and Thanks in help output.
The Copyright string is changing often, and its content is obvious.
It does not need translation. The remaining string can be translated.
This change avoids a stale translation once one of the years change.