]> granicus.if.org Git - neomutt/log
neomutt
7 years agoUpdated Esperanto translation.
Benno Schulenberg [Wed, 22 Feb 2017 20:58:24 +0000 (12:58 -0800)]
Updated Esperanto translation.

7 years agoMinor touchups to documentation and UPDATING file.
Kevin McCarthy [Wed, 22 Feb 2017 20:50:02 +0000 (12:50 -0800)]
Minor touchups to documentation and UPDATING file.

7 years agoReword some of the UPDATING entries.
Kevin McCarthy [Mon, 20 Feb 2017 02:30:51 +0000 (18:30 -0800)]
Reword some of the UPDATING entries.

Thanks to Matthias Andree for his feedback and suggestions!

7 years agoAdd 1.8.0 entries to the UPDATING file.
Kevin McCarthy [Sat, 18 Feb 2017 23:15:01 +0000 (15:15 -0800)]
Add 1.8.0 entries to the UPDATING file.

7 years agodocs: fix typo in notmuch example
Richard Russon [Mon, 20 Feb 2017 18:35:38 +0000 (18:35 +0000)]
docs: fix typo in notmuch example

7 years agostyle: don't align assignments -- too often ugly
Richard Russon [Mon, 20 Feb 2017 22:00:04 +0000 (22:00 +0000)]
style: don't align assignments -- too often ugly

7 years agohandle sigint within socket operations (#411)
Edward Betts [Fri, 24 Feb 2017 16:37:16 +0000 (16:37 +0000)]
handle sigint within socket operations (#411)

When trying to use mutt with non-SSL IMAP it intermittently throws
'Error talking to localhost (Interrupted system call)' and closes
the mailbox.

Closes #407
Closes #408
Closes #411

7 years agoUse getaddrinfo_a if possible (#420)
Mehdi ABAAKOUK [Fri, 24 Feb 2017 14:43:36 +0000 (15:43 +0100)]
Use getaddrinfo_a if possible (#420)

When getaddrinfo_a is avialable we can use it to set a timeout for the
dns resolution. This avoid to have mutt that freeze on startup when the
network connection isn't working and the hosts/hostname misconfigured on
the system.

Closes #176
Closes #420

7 years agoRemove ugly macros and casts from crypt-gpgme.c 419/head
Pietro Cerutti [Tue, 21 Feb 2017 14:47:32 +0000 (14:47 +0000)]
Remove ugly macros and casts from crypt-gpgme.c

7 years agofix minor reflow issues in some comments 418/head
toogley [Tue, 21 Feb 2017 20:00:57 +0000 (21:00 +0100)]
fix minor reflow issues in some comments

See: https://github.com/neomutt/neomutt/pull/392#discussion_r102072729
for the discussion.

7 years agoMerge branch 'translate', updates from upstream
Guillaume Brogi [Wed, 22 Feb 2017 22:47:12 +0000 (23:47 +0100)]
Merge branch 'translate', updates from upstream

Update a bunch of translations from upstream:
    1536c45 Updated Catalan translation.
    ffc0e1f Updated Russian translation.
    55f2b57 Updated Ukrainian translation.
    47341a9 Updated Danish translation.
    b792e8e Updated Czech translation.
    fcf7330 Updated Czech translation.
    975efd6 Updated French translation.

7 years agoUpdated Catalan translation.
Ivan Vilata i Balaguer [Sat, 18 Feb 2017 04:02:46 +0000 (20:02 -0800)]
Updated Catalan translation.

7 years agoUpdated Russian translation.
Vsevolod Volkov [Thu, 16 Feb 2017 20:44:06 +0000 (12:44 -0800)]
Updated Russian translation.

7 years agoUpdated Ukrainian translation.
Vsevolod Volkov [Thu, 16 Feb 2017 20:41:09 +0000 (12:41 -0800)]
Updated Ukrainian translation.

7 years agoUpdated Danish translation.
Morten Bo Johansen [Thu, 16 Feb 2017 19:22:49 +0000 (11:22 -0800)]
Updated Danish translation.

7 years agoUpdated Czech translation.
Petr Pisar [Mon, 13 Feb 2017 20:26:30 +0000 (12:26 -0800)]
Updated Czech translation.

7 years agoUpdated Czech translation.
Petr Pisar [Fri, 10 Feb 2017 20:56:42 +0000 (12:56 -0800)]
Updated Czech translation.

7 years agoUpdated French translation.
Vincent Lefevre [Fri, 10 Feb 2017 11:51:17 +0000 (12:51 +0100)]
Updated French translation.

7 years agomerge: prepare the source for clang-format
Richard Russon [Mon, 20 Feb 2017 17:19:44 +0000 (17:19 +0000)]
merge: prepare the source for clang-format

 * fix 80 column limit, align statements
 * add clang-format file
 * added comment-blocks for clang-format to ignore
 * editorconfig: use spaces to indent in *.[ch] files

closes #392

7 years agoeditorconfig: use spaces to indent in *.[ch] files 392/head
toogley [Sun, 19 Feb 2017 17:32:19 +0000 (18:32 +0100)]
editorconfig: use spaces to indent in *.[ch] files

7 years agoadded comment-blocks for clang-format to ignore
toogley [Sat, 11 Feb 2017 21:25:20 +0000 (22:25 +0100)]
added comment-blocks for clang-format to ignore

7 years agoadd clang-format file
toogley [Sat, 11 Feb 2017 10:11:33 +0000 (11:11 +0100)]
add clang-format file

7 years agofix 80 column limit, align statements
toogley [Sat, 11 Feb 2017 21:39:47 +0000 (22:39 +0100)]
fix 80 column limit, align statements

7 years agonotmuch: Allow to use untransformed tag for color 417/head
Mehdi Abaakouk [Mon, 20 Feb 2017 09:05:39 +0000 (10:05 +0100)]
notmuch: Allow to use untransformed tag for color

closes #417

7 years agomerge: upstream fixes (mutt/default)
Richard Russon [Mon, 20 Feb 2017 16:52:49 +0000 (16:52 +0000)]
merge: upstream fixes (mutt/default)

 * Change "allow_dups" into a flag at hash creation.
 * Filter expired local certs for OpenSSL verification.
 * Plug memory leak in weed-expired-certs code.
 * Fix potential cert memory leak in check_certificate_by_digest().
 * Show SHA1 fp in interactive cert check menu.
 * Prevent null pointer exception for h->ai_canonname

closes #413

7 years agoPrevent null pointer exception for h->ai_canonname 413/head
Athanasios Douitsis [Sat, 18 Feb 2017 21:30:27 +0000 (21:30 +0000)]
Prevent null pointer exception for h->ai_canonname

The getaddrinfo call in line 54 sets &h to a struct addrinfo. If a
canonical name cannot be found for the node argument of getaddrinfo,
h->ai_canonname is set to NULL. In that case, the strchr call in line
58 can lead to segfault. This behavior was observed on a macos sierra
while the hostname was 192.168.1.3 (unfortunately this happens quite
often in macos).

The fix is simple, just check h->ai_canonname for the NULL value.

7 years agoShow SHA1 fp in interactive cert check menu.
Matthias Andree [Sun, 12 Feb 2017 21:03:03 +0000 (13:03 -0800)]
Show SHA1 fp in interactive cert check menu.

While here, fix a few compiler warnings about sign mismatch in comparison.

7 years agoFix potential cert memory leak in check_certificate_by_digest().
Kevin McCarthy [Sun, 12 Feb 2017 20:24:51 +0000 (12:24 -0800)]
Fix potential cert memory leak in check_certificate_by_digest().

Thanks to Matthias Andree's debugging, it appears the cert is not
freed when PEM_read_X509() encounters EOF.  Change the return value
check to not overwrite cert.  It is already updated via the second
parameter.

7 years agoPlug memory leak in weed-expired-certs code.
Matthias Andree [Sun, 12 Feb 2017 17:59:48 +0000 (09:59 -0800)]
Plug memory leak in weed-expired-certs code.

X509_STORE_add_cert() creates a copy of the certificate we're offering,
so we need to free our copy afterwards.  This isn't documented, but from
observed behaviour in OpenSSL 1.0.2 and its master branch source code.

Change PEM_read_X509() call to reuse cert to avoid free/reallocation
overhead.

7 years agoFilter expired local certs for OpenSSL verification.
Kevin McCarthy [Sun, 12 Feb 2017 17:59:41 +0000 (09:59 -0800)]
Filter expired local certs for OpenSSL verification.

OpenSSL has trouble establishing the chain and verifying when
duplicate expired certs are loaded in from $certificate_file.  A
warning about this is mentioned in
SSL_CTX_load_verify_locations(3SSL).

Filter out expired certs when loading verify certs.  Note that the
full certicates file is still used for verification in
check_certificate_by_digest().

7 years agoChange "allow_dups" into a flag at hash creation.
Kevin McCarthy [Fri, 10 Feb 2017 21:01:21 +0000 (13:01 -0800)]
Change "allow_dups" into a flag at hash creation.

Instead of having an "allow_dups" parameter for hash_insert(), add a
flag, MUTT_HASH_ALLOW_DUPS, to hash_create().

Currently ReverseAlias, subj_hash, and thread_hash allow duplicate
keys.  Change those hashes to pass the flag at creation, and remove
the last parameter from all callers of hash_insert().

7 years agomerge: fix coverity defects
Richard Russon [Mon, 20 Feb 2017 16:46:15 +0000 (16:46 +0000)]
merge: fix coverity defects

 * fix: resource leak - CID 76962
 * fix: resource leak - CID 76963
 * fix: resource leak - CID 76965
 * fix: resource leak - CID 76966
 * fix: resource leak - CID 76967
 * fix: resource leak - CID 76968
 * fix: resource leak - CID 76972
 * fix: resource leak - CID 76975
 * fix: resource leak - CID 76976
 * fix: resource leak - CID 76977
 * fix: resource leak - CID 76978
 * fix: resource leak - CID 76979
 * fix: resource leak - CID 76980
 * fix: resource leak - CID 76982
 * fix: resource leak - CID 76983
 * fix: resource leak - CID 76984
 * fix: resource leak - CID 76985
 * fix: resource leak - CID 76986
 * fix: resource leak - CID 83477
 * fix: resource leak - CID 83478
 * fix: resource leak - CID 150921
 * fix: resource leak - CID 160977

closes: #405

7 years agofix: resource leak - CID 160977 405/head
Richard Russon [Thu, 16 Feb 2017 12:45:44 +0000 (12:45 +0000)]
fix: resource leak - CID 160977

7 years agofix: resource leak - CID 150921
Richard Russon [Thu, 16 Feb 2017 12:29:47 +0000 (12:29 +0000)]
fix: resource leak - CID 150921

7 years agofix: resource leak - CID 83478
Richard Russon [Thu, 16 Feb 2017 12:27:14 +0000 (12:27 +0000)]
fix: resource leak - CID 83478

7 years agofix: resource leak - CID 83477
Richard Russon [Thu, 16 Feb 2017 12:26:58 +0000 (12:26 +0000)]
fix: resource leak - CID 83477

7 years agofix: resource leak - CID 76986
Richard Russon [Thu, 16 Feb 2017 12:40:37 +0000 (12:40 +0000)]
fix: resource leak - CID 76986

7 years agofix: resource leak - CID 76985
Richard Russon [Thu, 16 Feb 2017 12:40:21 +0000 (12:40 +0000)]
fix: resource leak - CID 76985

7 years agofix: resource leak - CID 76984
Richard Russon [Thu, 16 Feb 2017 12:43:39 +0000 (12:43 +0000)]
fix: resource leak - CID 76984

7 years agofix: resource leak - CID 76983
Richard Russon [Thu, 16 Feb 2017 12:29:29 +0000 (12:29 +0000)]
fix: resource leak - CID 76983

7 years agofix: resource leak - CID 76982
Richard Russon [Thu, 16 Feb 2017 12:29:08 +0000 (12:29 +0000)]
fix: resource leak - CID 76982

7 years agofix: resource leak - CID 76980
Richard Russon [Thu, 16 Feb 2017 12:45:23 +0000 (12:45 +0000)]
fix: resource leak - CID 76980

7 years agofix: resource leak - CID 76979
Richard Russon [Thu, 16 Feb 2017 12:44:54 +0000 (12:44 +0000)]
fix: resource leak - CID 76979

7 years agofix: resource leak - CID 76978
Richard Russon [Thu, 16 Feb 2017 12:44:44 +0000 (12:44 +0000)]
fix: resource leak - CID 76978

7 years agofix: resource leak - CID 76977
Richard Russon [Thu, 16 Feb 2017 12:45:35 +0000 (12:45 +0000)]
fix: resource leak - CID 76977

7 years agofix: resource leak - CID 76976
Richard Russon [Thu, 16 Feb 2017 12:25:29 +0000 (12:25 +0000)]
fix: resource leak - CID 76976

7 years agofix: resource leak - CID 76975
Richard Russon [Thu, 16 Feb 2017 12:40:50 +0000 (12:40 +0000)]
fix: resource leak - CID 76975

7 years agofix: resource leak - CID 76972
Richard Russon [Thu, 16 Feb 2017 12:37:20 +0000 (12:37 +0000)]
fix: resource leak - CID 76972

7 years agofix: resource leak - CID 76968
Richard Russon [Thu, 16 Feb 2017 12:47:15 +0000 (12:47 +0000)]
fix: resource leak - CID 76968

7 years agofix: resource leak - CID 76967
Richard Russon [Thu, 16 Feb 2017 12:46:47 +0000 (12:46 +0000)]
fix: resource leak - CID 76967

7 years agofix: resource leak - CID 76966
Richard Russon [Thu, 16 Feb 2017 12:47:02 +0000 (12:47 +0000)]
fix: resource leak - CID 76966

7 years agofix: resource leak - CID 76965
Richard Russon [Thu, 16 Feb 2017 12:33:50 +0000 (12:33 +0000)]
fix: resource leak - CID 76965

7 years agofix: resource leak - CID 76963
Richard Russon [Thu, 16 Feb 2017 12:36:10 +0000 (12:36 +0000)]
fix: resource leak - CID 76963

7 years agofix: resource leak - CID 76962
Richard Russon [Thu, 16 Feb 2017 12:36:56 +0000 (12:36 +0000)]
fix: resource leak - CID 76962

7 years agodocs: remove duplicate "default" in the sidebar intro
Edward Betts [Sun, 19 Feb 2017 13:40:12 +0000 (13:40 +0000)]
docs: remove duplicate "default" in the sidebar intro

[ci skip]

7 years agocorrect spelling mistakes (#412)
Edward Betts [Sat, 18 Feb 2017 14:40:01 +0000 (14:40 +0000)]
correct spelling mistakes (#412)

7 years agobuild: fix doc generator
Richard Russon [Sat, 18 Feb 2017 13:45:56 +0000 (13:45 +0000)]
build: fix doc generator

7 years agotravis: use container build
Richard Russon [Fri, 17 Feb 2017 14:21:05 +0000 (14:21 +0000)]
travis: use container build

Travis offers two build environments: fully virtualised, container.

Until recently the container version didn't have all the libraries that we
needed.  Now it does.

The container is much faster to start up: <1s rather that ~20s.

7 years agoUpdate the german translation (#397)
Wieland Hoffmann [Fri, 17 Feb 2017 10:00:13 +0000 (11:00 +0100)]
Update the german translation (#397)

7 years agoRemove snprintf.c from EXTRA_DIST (#406)
Pietro Cerutti [Thu, 16 Feb 2017 07:16:31 +0000 (07:16 +0000)]
Remove snprintf.c from EXTRA_DIST (#406)

Pull #402

7 years agoKill homebrew (v)snprintf implementations, as they are C99 (#402)
Pietro Cerutti [Thu, 16 Feb 2017 06:53:52 +0000 (06:53 +0000)]
Kill homebrew (v)snprintf implementations, as they are C99 (#402)

7 years agoMerge pull request #400 from neomutt/devel/issue-336
Pierre-Elliott Bécue [Wed, 15 Feb 2017 09:14:13 +0000 (10:14 +0100)]
Merge pull request #400 from neomutt/devel/issue-336

Avoid browsing the remote spoolfile by setting MUTT_SELECT_MULTI attach

7 years agonotmuch: fix crash when completing tags (#395)
William Pettersson [Tue, 14 Feb 2017 18:24:02 +0000 (05:24 +1100)]
notmuch: fix crash when completing tags (#395)

Notmuch was found to sometimes return a NULL when asked for a list of
tags.  This caused mutt to crash when trying to autocomplete.

Thanks to William Pettersson (@WPettersson) for the initial patch.

Closes #393
Closes #395

7 years agoDisplay charset + small refactoring
Pietro Cerutti [Sat, 11 Feb 2017 17:24:34 +0000 (17:24 +0000)]
Display charset + small refactoring

7 years agoAdd option $show_multipart_alternative
Ismaël Bouya [Fri, 10 Feb 2017 20:10:05 +0000 (21:10 +0100)]
Add option $show_multipart_alternative

When viewing a multi-part MIME email:
    'alternative_order' determines which part is displayed
    'auto_view' determines how the part is displayed

$show_multipart_alternative has three options to control what is displayed:
    unset    Only the chosen part (default)
    'info'   The chosen part plus information about the other parts
    'inline' All the parts

7 years agobuild: add a few includes (prelude to clang-format)
Richard Russon [Thu, 26 Jan 2017 01:22:19 +0000 (01:22 +0000)]
build: add a few includes (prelude to clang-format)

7 years agobuild: slcurses.h defines its own bool type
Richard Russon [Tue, 14 Feb 2017 16:16:15 +0000 (16:16 +0000)]
build: slcurses.h defines its own bool type

7 years agoAvoid browsing the remote spoolfile by setting MUTT_SELECT_MULTI attach 400/head
Pietro Cerutti [Sun, 5 Feb 2017 15:59:17 +0000 (15:59 +0000)]
Avoid browsing the remote spoolfile by setting MUTT_SELECT_MULTI attach

Closes #336

7 years agoFixes missing failure return of notmuch msg open (#401)
guyzmo [Tue, 14 Feb 2017 14:49:32 +0000 (15:49 +0100)]
Fixes missing failure return of notmuch msg open (#401)

When calling the mx_ops->open_msg() method of the notmuch
implementation, if the message failed to open, it is not reported to the
user interface. This patch returns a non-zero value that will prevent a
crash.

fixes #308

Signed-off-by: Pietro Cerutti <gahr@gahr.ch>
Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
7 years agoDo not cast or check returns from safe_calloc (#396)
Pietro Cerutti [Mon, 13 Feb 2017 12:38:36 +0000 (12:38 +0000)]
Do not cast or check returns from safe_calloc (#396)

Fixes #388

7 years agoFix latest Coverity issues (#387)
Pietro Cerutti [Fri, 10 Feb 2017 17:14:13 +0000 (17:14 +0000)]
Fix latest Coverity issues (#387)

* Fix two use-before-check bugs

Closes #386

* Fix memory leak

Issue #386

* Treat a NULL b->subtype as a wildcard (*)

Issue #386

* Move assignment out of conditional

Closes #386

* Move assignment out of conditional (2)

Closes #386

7 years agoAdvance by the correct number of position even for unknown characters (#368)
Pietro Cerutti [Fri, 10 Feb 2017 17:09:51 +0000 (17:09 +0000)]
Advance by the correct number of position even for unknown characters (#368)

Closes #245

7 years agomerge: sync to mutt/default
Richard Russon [Fri, 10 Feb 2017 15:15:13 +0000 (15:15 +0000)]
merge: sync to mutt/default

I've been cherry-picking all of mutt's upstream changes.
This gave us a neat and tidy commit history, but GitHub thinks we're
very out-of-sync.

This merge doesn't make any changes, but shows GitHub where we are.

7 years agomerge: upstream fixes (mutt/default)
Richard Russon [Fri, 10 Feb 2017 15:13:47 +0000 (15:13 +0000)]
merge: upstream fixes (mutt/default)

 * Canonicalize line endings for GPGME S/MIME encryption. (closes #3904)
 * Add a pattern_cache_t to speed up a few repeated matches.
 * Fix imap server-side search to call uid2msgno() only once. (see #3905)
 * Convert HASH to be indexable by unsigned int. (see #3905)
 * Create a uid hash for imap. (see #3905)
 * Convert cmd_parse_search to use the uid hash. (closes #3905)
 * Fix minor documentation issues.
 * Allow initial blank lines in local mailboxes.
 * Improve error handling in mbox magic detection.
 * Add casecmp and strdup_key flags to hash_create()
 * Fix several alias hashtable issues.
 * Fix sidebar references to the "new count" to be "unread". (closes #3908)
 * Improve Reply-to vs From comparison when replying. (closes #3909)
 * Abstract the SPAM_LIST as a generic REPLACE_LIST
 * Add subjectrx command to replace matching subjects with something else.
 * Allow "unsubjectrc *" to remove all patterns.
 * Adds capability to edit x-labels inside mutt, and to sort by label.
 * Minor fixes to the x-label patch from David.
 * Add hash_find_elem to get the hash element.
 * Adds label completion.
 * Improve the label completion hash table usage.
 * Fix the x-label update code check location.
 * Fix the mutt_label_complete() pos parameter.
 * Permit tab completion of pattern expressions with ~y (labels).
 * Simplify mutt_label_complete().

7 years agoSimplify mutt_label_complete(). 385/head
Kevin McCarthy [Tue, 31 Jan 2017 22:27:36 +0000 (14:27 -0800)]
Simplify mutt_label_complete().

It was derived from mutt_command_complete(), which had more complex
requirements.  For labels, we just need to skip whitespace and
complete based on the passed in buffer.

Therefore, we don't need the pos parameter, or to work backwards from
the end of the buffer.

7 years agoPermit tab completion of pattern expressions with ~y (labels).
Kevin McCarthy [Tue, 31 Jan 2017 22:27:28 +0000 (14:27 -0800)]
Permit tab completion of pattern expressions with ~y (labels).

Thanks to David Champion for the original patch.  This version is
slightly different, as I couldn't get the original patch working.
This version simply scans backward for the first ~, and if it is ~y,
invokes completion.

7 years agoFix the mutt_label_complete() pos parameter.
Kevin McCarthy [Tue, 31 Jan 2017 22:27:09 +0000 (14:27 -0800)]
Fix the mutt_label_complete() pos parameter.

i is the state->wbuf index, not the end of the buf.  It was "working"
only because the contents of buf past the null were not "space" most
of the time.

7 years agoFix the x-label update code check location.
Kevin McCarthy [Sun, 29 Jan 2017 19:02:50 +0000 (11:02 -0800)]
Fix the x-label update code check location.

The x-label comparison was outside the "beginning of header" block.

This meant that it could theoretically match a continuation line.
Additionally, the continuation lines of x-labels would not be
stripped, because the comparison was after the ignore variable was
reset.

Move the comparison inside the block and before the ignore reset.

7 years agoImprove the label completion hash table usage.
Kevin McCarthy [Sun, 29 Jan 2017 02:48:08 +0000 (18:48 -0800)]
Improve the label completion hash table usage.

Move the hash table inside the Context.  Hook message arrival/deletion
to update the label hash.

Change the label hash to strdup keys.

Use hash_find_elem when updating the counter, to reduce unnecessary
add/delete operations.

7 years agoAdds label completion.
David Champion [Sun, 29 Jan 2017 02:47:57 +0000 (18:47 -0800)]
Adds label completion.

A global label hash is added, to which labels are added as they're parsed
from a mailbox file or edited manually by the user.  Reference counts are
kept in the hash table so that unused labels are removed from available
completions.  Completion is available in the label editor only, but it
may be feasible to add for search expressions if the preceding text ends
with '~y'.

7 years agoAdd hash_find_elem to get the hash element.
Kevin McCarthy [Sun, 29 Jan 2017 02:47:48 +0000 (18:47 -0800)]
Add hash_find_elem to get the hash element.

This will be used in the following patch for directly manipulating the
label counter.

7 years agoMinor fixes to the x-label patch from David.
Kevin McCarthy [Sun, 29 Jan 2017 02:47:26 +0000 (18:47 -0800)]
Minor fixes to the x-label patch from David.

Add L10N comment to sort menu.  Mark a couple strings for localization.

Use ascii_strncasecmp() for the X-Label header comparison.

Simplify label_message() using mutt library routines.

Bind label editing to "Y" instead of "y".  "y" is already used in the
default sample muttrc to display mailboxes.

7 years agoAdds capability to edit x-labels inside mutt, and to sort by label.
David Champion [Sun, 29 Jan 2017 02:47:15 +0000 (18:47 -0800)]
Adds capability to edit x-labels inside mutt, and to sort by label.

7 years agoAllow "unsubjectrc *" to remove all patterns.
Kevin McCarthy [Tue, 24 Jan 2017 23:33:23 +0000 (15:33 -0800)]
Allow "unsubjectrc *" to remove all patterns.

Thanks to Aaron Schrab for the original patch.

7 years agoAdd subjectrx command to replace matching subjects with something else.
David Champion [Tue, 24 Jan 2017 03:01:50 +0000 (19:01 -0800)]
Add subjectrx command to replace matching subjects with something else.

This lets you define regular expressions-replacement pairs for subject
display.  When a Subject: matches the regular expression, the replacement
value will be displayed instead in the message index.  Backreferences
are supported.

This is especially nice for simplifying subjects that are overly wordy,
such as mailing list posts (with [Listname] tags, etc), mail from
ticketing systems or bug trackers, etc.  It lets you reduce clutter in
your mutt display without altering the messages themselves.

7 years agoAbstract the SPAM_LIST as a generic REPLACE_LIST
David Champion [Tue, 24 Jan 2017 03:01:36 +0000 (19:01 -0800)]
Abstract the SPAM_LIST as a generic REPLACE_LIST

REPLACE_LIST can be used more generally as a list of pattern
match-replace settings.  SPAM_LIST was a special case of this, so
spam handling has been been changed to use REPLACE_LIST instead, and
SPAM_LIST was removed.

A generic function for performing a REPLACE_LIST replacement has
been added in mutt_apply_replace().

Commited by Kevin McCarthy with some buffer overflow fixes in
mutt_apply_replace().

7 years agoImprove Reply-to vs From comparison when replying. (closes #3909)
Kevin McCarthy [Tue, 24 Jan 2017 02:46:16 +0000 (18:46 -0800)]
Improve Reply-to vs From comparison when replying. (closes #3909)

Prior to this patch, if the Reply-to mailbox matched the From mailbox,
mutt would always use the From address.  This was probably done to
preserve the display name, as the Reply-to address is often missing one.

Unfortunately, there are circumstances where the Reply-to display-name
has significance, such as in ticket 3909.

Change mutt so that it only uses the From address if the Reply-To has
no display-name.

7 years agoFix sidebar references to the "new count" to be "unread". (closes #3908)
Kevin McCarthy [Thu, 19 Jan 2017 22:58:13 +0000 (14:58 -0800)]
Fix sidebar references to the "new count" to be "unread". (closes #3908)

%N in $sidebar_format and "new"in $sidebar_sort_method actually use
the unread message count.  Update the documentation to mention that.

Add an "unread" method to $sidebar_sort_method, but preserve "new" for
compatibility.

Change the SORT_COUNT_NEW constant to SORT_UNREAD, so the code is also
consistent with the meaning.

Thanks to cri for reporting the problem and suggesting where to fix it
in the code.

7 years agoFix several alias hashtable issues.
Kevin McCarthy [Wed, 18 Jan 2017 00:09:16 +0000 (16:09 -0800)]
Fix several alias hashtable issues.

Convert to use the strdup keys hash.  Addresses can be converted back
and forth from intl to local forms.  This frees and recreates a new
addr->mailbox string, resulting in the hash table key being a dangling
pointer.

Change alias hash table insert/remove to ensure the address is in intl
form.  The alias menu (previously) converted address entries to local
form when performing a completion.  Even with the pointer issue fixed,
the entries may not be removed from the hash if the intl and local
forms are different.

Lastly, there is no reason for the alias menu to manually convert to
local form before writing the address to the output buffer.
rfc822_write_address() has a display parameter that will call
mutt_addr_for_display() instead when set.  Change to set the display
parameter and remove the conversion calls.

This last change obviates the first two changes, but they are a good idea
in any case.

7 years agoAdd casecmp and strdup_key flags to hash_create()
Kevin McCarthy [Wed, 18 Jan 2017 00:09:11 +0000 (16:09 -0800)]
Add casecmp and strdup_key flags to hash_create()

Aliases and (in the future), X-Label hashes will require a hash that
strdups the key.  Convert the casecmp parameter of hash_create() to a
flags parameter, and add a flag to strdup the keys.

7 years agoImprove error handling in mbox magic detection.
Kevin McCarthy [Sun, 15 Jan 2017 18:00:55 +0000 (10:00 -0800)]
Improve error handling in mbox magic detection.

Thanks to Simon Ruderich for pointing out several small issues with
the previous commit.

7 years agoAllow initial blank lines in local mailboxes.
David Champion [Sun, 15 Jan 2017 03:18:45 +0000 (19:18 -0800)]
Allow initial blank lines in local mailboxes.

Some mailbox-creation tools erroneously append a blank line to a file
before appending a UNIXv7-format mail message, resulting in mailboxes
that are intended to be valid "mbox" folders but are not.  Notably old
versions of Mailman do this, making archive files that cannot be read by
mutt.

This patch causes mutt to skip leading NLs and CRs when detecting magic.

7 years agoFix minor documentation issues.
Simon Ruderich [Tue, 10 Jan 2017 22:48:08 +0000 (14:48 -0800)]
Fix minor documentation issues.

manual.xml:
Wrap line for clarity.

muttrc.man:
Remove superfluous spaces in brackets.
Add missing error object in color command.
Sort the prompt object.
Add sidebar color objects.

7 years agoConvert cmd_parse_search to use the uid hash. (closes #3905)
Kevin McCarthy [Fri, 6 Jan 2017 22:37:48 +0000 (14:37 -0800)]
Convert cmd_parse_search to use the uid hash. (closes #3905)

Replace the linear scan for each result with a hash lookup.  This
should greatly improve performance for large mailboxes.

7 years agoCreate a uid hash for imap. (see #3905)
Kevin McCarthy [Fri, 6 Jan 2017 22:23:28 +0000 (14:23 -0800)]
Create a uid hash for imap. (see #3905)

This hash will allow for more efficient UID SEARCH processing,
replacing a linear scan with a hash lookup.

7 years agoConvert HASH to be indexable by unsigned int. (see #3905)
Kevin McCarthy [Fri, 6 Jan 2017 22:17:10 +0000 (14:17 -0800)]
Convert HASH to be indexable by unsigned int. (see #3905)

Convert the HASH to be usable for either string or unsigned int keys,
so that a uid hash can be added for imap.

To keep hash-usage code disruption to a minimum, this introduces new
create/insert/find/delete functions for the int hash, but keeps the
old function names for string keys.

This implementation makes the key a union.  It may have been a better
idea to introduce a whole new structure, but this way allows minimum
changes to and maximum reuse of the existing hash code.

7 years agoFix imap server-side search to call uid2msgno() only once. (see #3905)
Kevin McCarthy [Thu, 5 Jan 2017 03:45:59 +0000 (19:45 -0800)]
Fix imap server-side search to call uid2msgno() only once. (see #3905)

After performing a UID SEARCH, the results are parsed in
cmd_parse_search().  This was accidentally calling uid2msgno() twice.
Since that function does a linear search, this has a noticable impact
on large search results.

7 years agoAdd a pattern_cache_t to speed up a few repeated matches.
Kevin McCarthy [Tue, 3 Jan 2017 02:08:17 +0000 (18:08 -0800)]
Add a pattern_cache_t to speed up a few repeated matches.

Vincent Lefèvre reported experiencing an index display performance
issue.  This occurred with messages containing many recipients.  He
had many index color lines containing ~l.  The ~l ended up being run
over and over on these messages, resulting in a noticable slowdown
displaying the index.

This patch adds caching for just a few of the pattern operations (~l,
~u, ~p, ~P) that are potentially expensive and also don't have
arguments.  The caching is only enabled for operations repeatedly
matching against the same message: color, hooks, scoring.

The caching is fairly targeted, but isn't that invasive or
complicated.

7 years agoCanonicalize line endings for GPGME S/MIME encryption. (closes #3904)
Kevin McCarthy [Sun, 1 Jan 2017 03:57:07 +0000 (19:57 -0800)]
Canonicalize line endings for GPGME S/MIME encryption. (closes #3904)

This matches the behavior for S/MIME classic mode: OpenSSL converts
the line endings to cr/lf before encrypting.  Although Mutt always
canonicalizes the line endings before verifying the signature, some
clients do not do this for encrypted messages.

Thanks to cooler for the patch!

7 years agoRelease KyotoCabinet data with kcfree() (#384)
Pietro Cerutti [Fri, 10 Feb 2017 03:29:36 +0000 (03:29 +0000)]
Release KyotoCabinet data with kcfree() (#384)

Obtained from https://dev.mutt.org/hg/mutt/rev/09bb4a62ceb1

Closes #383