]> granicus.if.org Git - neomutt/log
neomutt
6 years agomisc
Richard Russon [Thu, 18 Oct 2018 19:54:23 +0000 (20:54 +0100)]
misc

6 years agorename Mailbox private data
Richard Russon [Thu, 18 Oct 2018 20:13:37 +0000 (21:13 +0100)]
rename Mailbox private data

6 years agorename Email private data
Richard Russon [Thu, 18 Oct 2018 20:09:58 +0000 (21:09 +0100)]
rename Email private data

6 years agoclang-format
Richard Russon [Thu, 25 Oct 2018 17:26:15 +0000 (18:26 +0100)]
clang-format

6 years agoRevert "notmuch: count messages in queried threads"
Richard Russon [Sat, 20 Oct 2018 10:38:48 +0000 (11:38 +0100)]
Revert "notmuch: count messages in queried threads"

The change was causing severe performance problems with large mailboxes.

This reverts commit b71ac2bae5d471b2a32452d9103d4164f27f729f.

Issue #1359

6 years agorename nntp structs
Richard Russon [Wed, 17 Oct 2018 12:40:25 +0000 (13:40 +0100)]
rename nntp structs

6 years agoTry adding status indicator R for my address in Reply-To
Ian Zimmerman [Thu, 18 Oct 2018 09:14:21 +0000 (02:14 -0700)]
Try adding status indicator R for my address in Reply-To

It adds a new "R" flag for the 3rd position of the index %Z field, for when user's own address is in the Reply-To header unless none of the other flags for that field is applicable.

Some mailing lists now do the following transformation of the headers: rewrite the From header to the list address, and add a Reply-To header with the poster address.  This feature helps highlight my own posts in folders dedicated to such lists.  Of course if you are _subscribed_ to the list (in the Mutt sense) you'll get the "L" flag instead, but in that case you don't care about hightlighting your posts anyway.

6 years agorename mbox_get_mdata
Richard Russon [Tue, 16 Oct 2018 22:23:07 +0000 (23:23 +0100)]
rename mbox_get_mdata

6 years agoadd pop_get_mdata
Richard Russon [Tue, 16 Oct 2018 14:41:40 +0000 (15:41 +0100)]
add pop_get_mdata

6 years agomanual: document `named-mailboxes` for neomuttrc
Austin Ray [Mon, 15 Oct 2018 20:25:14 +0000 (16:25 -0400)]
manual: document `named-mailboxes` for neomuttrc

6 years agoadd MaildirMboxData
Richard Russon [Mon, 15 Oct 2018 15:04:56 +0000 (16:04 +0100)]
add MaildirMboxData

6 years agofix some mailbox logic
Richard Russon [Mon, 15 Oct 2018 15:21:51 +0000 (16:21 +0100)]
fix some mailbox logic

6 years agomerge: add <named-mailboxes> command
Richard Russon [Sat, 13 Oct 2018 23:06:07 +0000 (00:06 +0100)]
merge: add <named-mailboxes> command

 * mailbox: try to find existing description
 * format: add `%D` - mailbox description
 * Add `named-mailboxes` command
 * browser: `%i` - folder_format description expando

6 years agobrowser: `%i` - folder_format description expando 1358/head
Austin Ray [Fri, 12 Oct 2018 16:15:22 +0000 (12:15 -0400)]
browser: `%i` - folder_format description expando

`%i` will display the description for a folder and fallback to the
folder's name if a description does not exist.

6 years agoAdd `named-mailboxes` command
Austin Ray [Thu, 11 Oct 2018 22:54:36 +0000 (18:54 -0400)]
Add `named-mailboxes` command

No additional work is necessary since this command reuses the same code
as `mailboxes` and `virtual-mailboxes`. This was surprisingly simple.

6 years agoformat: add `%D` - mailbox description
Austin Ray [Thu, 11 Oct 2018 20:16:02 +0000 (16:16 -0400)]
format: add `%D` - mailbox description

Added the `%D` expando, which displays the mailbox's description, to
sidebar_format and status_format. If the mailbox does not have a
description, fallback to the path.

This behavior is same as `%f` and `%B` for `virtual-mailboxes`. This
was done to prevent breaking existing configurations as `notmuch`
queries have unsightly paths.

This lays the ground work for introducing `named-mailboxes`.

6 years agomailbox: try to find existing description
Austin Ray [Thu, 11 Oct 2018 18:18:40 +0000 (14:18 -0400)]
mailbox: try to find existing description

`mx_mbox_open(...)` creates a new `Context`, which requires creating new
`Mailbox` instances. Modified `mailbox_new(...)` to try and find an
existing description that matches the mailbox `path`.

6 years agofix mailbox crashes
Richard Russon [Sat, 13 Oct 2018 11:09:00 +0000 (12:09 +0100)]
fix mailbox crashes

Fixes #1360
Fixes #1361

Thanks to Sergey Alirzaev (@l29ah)

6 years agodoxy: fix docs
Richard Russon [Fri, 12 Oct 2018 23:15:37 +0000 (00:15 +0100)]
doxy: fix docs

[ci skip]

6 years agorename config Account
Richard Russon [Thu, 11 Oct 2018 12:59:48 +0000 (13:59 +0100)]
rename config Account

6 years agotest: drop duplicate account code
Richard Russon [Thu, 11 Oct 2018 12:43:51 +0000 (13:43 +0100)]
test: drop duplicate account code

6 years agouse mutt_buffer_strcpy
Richard Russon [Tue, 2 Oct 2018 02:00:45 +0000 (03:00 +0100)]
use mutt_buffer_strcpy

6 years agonotmuch: count messages in queried threads
Austin Ray [Thu, 11 Oct 2018 15:38:50 +0000 (11:38 -0400)]
notmuch: count messages in queried threads

`count_query` did not handle counting all messages in `type=threads`
queries. It returned the number of messages matching the `query=`
qualifier. Refactored `count_query` into two methods handling
`type=threads` and `type=messages`, respectively.

This makes `sidebar_format`'s `%S` display the same value as
`pager_format`'s `%m`.

6 years agoimap: factor out get_adata
Richard Russon [Wed, 10 Oct 2018 15:00:28 +0000 (16:00 +0100)]
imap: factor out get_adata

6 years agofix imap log - buffer_add_printf
Richard Russon [Tue, 9 Oct 2018 23:52:37 +0000 (00:52 +0100)]
fix imap log - buffer_add_printf

6 years agotidy code
Richard Russon [Wed, 10 Oct 2018 22:06:03 +0000 (23:06 +0100)]
tidy code

6 years agorename things
Richard Russon [Wed, 10 Oct 2018 22:04:24 +0000 (23:04 +0100)]
rename things

6 years agofix comments
Richard Russon [Wed, 10 Oct 2018 21:57:10 +0000 (22:57 +0100)]
fix comments

6 years agomerge: upstream fixes
Richard Russon [Wed, 10 Oct 2018 22:10:59 +0000 (23:10 +0100)]
merge: upstream fixes

 * Fix gnutls (a)lways to properly save for all certerr values.
 * Change gnutls certificate_file processing and interactive prompts.
 * Add a comment about gnutls date bits in certstat.

6 years agoAdd a comment about gnutls date bits in certstat.
Kevin McCarthy [Wed, 10 Oct 2018 19:50:15 +0000 (12:50 -0700)]
Add a comment about gnutls date bits in certstat.

It's easy to miss the call disabling date checking and wonder why the
certstat bits are not set.

6 years agoFix IMAP auth w/o IR to not hang on failed authentication
Pietro Cerutti [Wed, 10 Oct 2018 14:13:23 +0000 (14:13 +0000)]
Fix IMAP auth w/o IR to not hang on failed authentication

6 years agoChange gnutls certificate_file processing and interactive prompts.
Kevin McCarthy [Tue, 9 Oct 2018 21:39:09 +0000 (14:39 -0700)]
Change gnutls certificate_file processing and interactive prompts.

Accept a saved cert at any point in the chain, except for those
revoked or with invalid dates.

The INSECUREALG processing was a bit goofed up.  It was skipping the
prompt for every chain except the host, and was only displaying an
error for entry 1 (the host being 0, root being len-1).  Instead
prompt at any point, and display a warning as with the other errors.

Add a CERTERR_OTHER type to capture other bits.  Recently GnuTLS has
added additional certificate_status_t types.  We may want to improve
the prompts in the future for those, but for now at least make sure
it's recorded in certerr.

6 years agoFix gnutls (a)lways to properly save for all certerr values.
Kevin McCarthy [Tue, 9 Oct 2018 20:28:15 +0000 (13:28 -0700)]
Fix gnutls (a)lways to properly save for all certerr values.

For the case of SIGNERNOTCA, INSECUREALG, or a newer unhandled value,
the "(a)ccept always" prompt was allowed, but the cert saving was
prevented by a check only against NOTTRUSTED.  This ended up giving a
strange error message saying the cert was not saved.

Fix to save the cert for all errors except HOSTNAME (which is handled
separately).

6 years agomerge: upstream refactoring
Richard Russon [Tue, 9 Oct 2018 14:32:46 +0000 (15:32 +0100)]
merge: upstream refactoring

 * Add buffer pool functions.
 * Convert imap_rename and pgp_invoke_list_keys to use buffer pool.
 * Create mutt_buffer_add_printf().
 * Convert mix_send_message to use buffer pool.
 * Convert buffy_maildir_check_dir to use struct Buffer.
 * Convert maildir_parse_dir to use struct Buffer.
 * Convert _maildir_commit_message to use struct Buffer.
 * Convert maildir_sync_message to use BUFFERs.
 * Convert maildir_canon_filename() and callers to use struct Buffer.

6 years agoFix segfault when checking a mailbox after a disconnect (III)
Pietro Cerutti [Tue, 9 Oct 2018 12:33:31 +0000 (12:33 +0000)]
Fix segfault when checking a mailbox after a disconnect (III)

Issue #1349

6 years agotidy
Richard Russon [Tue, 9 Oct 2018 01:26:06 +0000 (02:26 +0100)]
tidy

6 years agoConvert maildir_canon_filename() and callers to use struct Buffer.
Kevin McCarthy [Mon, 8 Oct 2018 02:08:42 +0000 (19:08 -0700)]
Convert maildir_canon_filename() and callers to use struct Buffer.

Callers are maildir_check_mailbox(), _maildir_open_find_message(), and
maildir_open_find_message().

6 years agoConvert maildir_sync_message to use BUFFERs.
Kevin McCarthy [Sun, 7 Oct 2018 23:17:36 +0000 (16:17 -0700)]
Convert maildir_sync_message to use BUFFERs.

6 years agoConvert _maildir_commit_message to use struct Buffer.
Kevin McCarthy [Sun, 7 Oct 2018 22:48:17 +0000 (15:48 -0700)]
Convert _maildir_commit_message to use struct Buffer.

6 years agoConvert maildir_parse_dir to use struct Buffer.
Kevin McCarthy [Sun, 7 Oct 2018 22:31:40 +0000 (15:31 -0700)]
Convert maildir_parse_dir to use struct Buffer.

Note: the uses of buf and tmp don't overlap, so we only use a single
struct Buffer.

6 years agoConvert buffy_maildir_check_dir to use struct Buffer.
Kevin McCarthy [Sun, 7 Oct 2018 22:18:34 +0000 (15:18 -0700)]
Convert buffy_maildir_check_dir to use struct Buffer.

6 years agoConvert mix_send_message to use buffer pool.
Kevin McCarthy [Mon, 8 Oct 2018 17:36:13 +0000 (10:36 -0700)]
Convert mix_send_message to use buffer pool.

6 years agoCreate mutt_buffer_add_printf().
Kevin McCarthy [Mon, 8 Oct 2018 17:48:29 +0000 (10:48 -0700)]
Create mutt_buffer_add_printf().

Change mutt_buffer_printf() to overwrite the buffer contents, like
mutt_buffer_strcpy().

mutt_buffer_add*() functions append to the buffer contents.

6 years agoConvert imap_rename and pgp_invoke_list_keys to use buffer pool.
Kevin McCarthy [Sat, 6 Oct 2018 22:07:27 +0000 (15:07 -0700)]
Convert imap_rename and pgp_invoke_list_keys to use buffer pool.

6 years agoAdd buffer pool functions.
Kevin McCarthy [Sat, 6 Oct 2018 20:53:33 +0000 (13:53 -0700)]
Add buffer pool functions.

Also add a few helper functions: mutt_buffer_clear(),
mutt_buffer_strcpy(), and a macro mutt_b2s to grab the buffer data as
a const char *.

6 years agoImapAccountData
Richard Russon [Fri, 28 Sep 2018 15:16:39 +0000 (16:16 +0100)]
ImapAccountData

Even though it's attached to a Mailbox, this is Account data.

6 years agonotmuch: use global settings for vfolder-from-query
Richard Russon [Mon, 8 Oct 2018 16:20:17 +0000 (17:20 +0100)]
notmuch: use global settings for vfolder-from-query

6 years agonotmuch: simplify uri creation logic 1241/head
Austin Ray [Sat, 6 Oct 2018 19:55:26 +0000 (15:55 -0400)]
notmuch: simplify uri creation logic

If `mdata` does not exist in `mailbox`, try to create a default instance
of `NmMboxData`. Using a default instance removes two conditionals from
`nm_uri_from_query(...)`, moving them to `nm_get_default_data(...)`.
This reduces the number of `snprintf(...)` to maintain, and allows query
parsing for type meta-data.

An extra variable keeps track of default data usage for freeing
allocated memory.

6 years agonotmuch: use global settings for vfolder-from-query
Josh Poimboeuf [Thu, 31 May 2018 21:58:02 +0000 (16:58 -0500)]
notmuch: use global settings for vfolder-from-query

When the <vfolder-from-query> command is run while already in a vfolder,
it takes the current vfolder as context.  That means the global settings
(nm_query_type, nm_db_limit, nm_default_uri) are ignored in favor of the
current vfolder's settings.  This is confusing behavior because the new
vfolder is otherwise independent from the old one.

Set the nm_uri_from_query() context to NULL so that it uses the global
settings instead.

6 years agofix index allocation
Richard Russon [Mon, 8 Oct 2018 12:11:08 +0000 (13:11 +0100)]
fix index allocation

The `vcount` wasn't being reset, so the index overflowed later.

6 years agonotmuch: fix variable used after its scope
Richard Russon [Sun, 7 Oct 2018 14:46:25 +0000 (15:46 +0100)]
notmuch: fix variable used after its scope

The progress bar keeps a reference to `msgbuf`.

6 years agonotmuch: reconstruct thread on-the-fly upon entire-thread and no vfolder 1346/head
Stefano Zacchiroli [Sun, 23 Sep 2018 07:48:52 +0000 (09:48 +0200)]
notmuch: reconstruct thread on-the-fly upon entire-thread and no vfolder

Before this change <entire-thread> worked only if invoked from a virtual
folder.

Now <entire-thread> works also from regular folders, with the following
semantics:

- a notmuch search is done on the fly using as query the message-id of the
  currently selected message

- mutt switches to the query result (a vfolder)

- <entire-thread> is invoked as before, expanding the thread of the original
  message

Closes #1345

6 years agomerge: trivial fixes
Richard Russon [Sat, 6 Oct 2018 10:57:15 +0000 (11:57 +0100)]
merge: trivial fixes

 * clang-format
 * cppcheck: reduce variable scope
 * scan-build: fix errors
 * replace strncpy with strfcpy

6 years agoreplace strncpy with strfcpy
Richard Russon [Fri, 5 Oct 2018 22:04:14 +0000 (23:04 +0100)]
replace strncpy with strfcpy

strncpy isn't guaranteed to NUL-terminate strings

6 years agoscan-build: fix errors
Richard Russon [Fri, 5 Oct 2018 17:14:09 +0000 (18:14 +0100)]
scan-build: fix errors

6 years agocppcheck: reduce variable scope
Richard Russon [Fri, 5 Oct 2018 16:17:42 +0000 (17:17 +0100)]
cppcheck: reduce variable scope

6 years agomerge: notmuch: Allow type= statements in vfolder-from-query
Richard Russon [Thu, 4 Oct 2018 14:56:10 +0000 (15:56 +0100)]
merge: notmuch: Allow type= statements in vfolder-from-query

 * Implement case-insensitive substring search
 * Implement substring removal function
 * Testing: mutt_str_strcasestr
 * Notmuch: Parse `type=` statements from query

Closes #1214
Closes #1319

6 years agoNotmuch: Parse `type=` statements from query 1319/head
Austin Ray [Sat, 18 Aug 2018 22:15:38 +0000 (18:15 -0400)]
Notmuch: Parse `type=` statements from query

Implemented a function that will parse `type=` statements from a notmuch
query and set the appropriate query type in `NmCtxData`.

This change allows a user to change the query type for a single query
without affecting other queries. The primary use is for executing
`vfolder-from-query`.

This commit ensures notmuch integration behavior conforms to NeoMutt's
notmuch documentation.

6 years agoTesting: mutt_str_strcasestr
Austin Ray [Sat, 18 Aug 2018 22:38:53 +0000 (18:38 -0400)]
Testing: mutt_str_strcasestr

Included alongside this implementation are tests for NULL input, empty
string inputs, non-existent needles, and different size haystacks.

6 years agoImplement substring removal function
Austin Ray [Sat, 18 Aug 2018 22:14:04 +0000 (18:14 -0400)]
Implement substring removal function

Implemented a method that removes all instances of a substring from a
given string. The method has protections against trying to remove a
non-existent substring.

6 years agoImplement case-insensitive substring search
Austin Ray [Sat, 18 Aug 2018 21:21:14 +0000 (17:21 -0400)]
Implement case-insensitive substring search

Implemented a portable case-insensitive substring search since the C
standard does not provide one. A C implementation may include one as an
extension, but there is no way to ensure portability.

This implementation does a byte-by-byte in-place comparison so it will
return unspecified results for multibyte locales.

Included alongside this implementation are tests for NULL input, empty
string inputs, non-existent needles, and different size haystacks.

6 years agoclang-format
Richard Russon [Thu, 4 Oct 2018 14:20:09 +0000 (15:20 +0100)]
clang-format

6 years agoadd %Fp expando for plain from address
x3nb63 [Fri, 27 Jul 2018 18:42:50 +0000 (20:42 +0200)]
add %Fp expando for plain from address

6 years agoNotmuch: Change default window to be open ended
Austin Ray [Wed, 22 Aug 2018 03:06:17 +0000 (23:06 -0400)]
Notmuch: Change default window to be open ended

Change the default query window to be open ended, allowing for mail
from the future to appear in a query. This may occur if the sender's
time settings are improperly configured.

Signed-off-by: Austin Ray <austin@austinray.io>
6 years agobuild: make samples reflect the provided libexecdir in ./configure
Joey Pabalinas [Mon, 1 Oct 2018 21:30:59 +0000 (11:30 -1000)]
build: make samples reflect the provided libexecdir in ./configure

The /usr/libexec path is hardcoded in some of the samples. Run
sed on the installed versions to reflect the directory provided
in ./configure.

Fixes issue #1350

Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
6 years agofix mailbox crash
Richard Russon [Tue, 2 Oct 2018 10:25:50 +0000 (11:25 +0100)]
fix mailbox crash

Mentioned in #1349
Thanks to @l29ah for the backtrace.

6 years agomove functions into mbox library
Richard Russon [Mon, 1 Oct 2018 21:33:52 +0000 (22:33 +0100)]
move functions into mbox library

6 years agomerge: upstream fixes
Richard Russon [Mon, 1 Oct 2018 22:34:23 +0000 (23:34 +0100)]
merge: upstream fixes

 * Increase buffer sizes for some IMAP commands.
 * Change imap_rename_mailbox to use a BUFFER.
 * Convert pgp_invoke_list_keys and mix_send_message to use BUFFERs.

6 years agoConvert pgp_invoke_list_keys and mix_send_message to use BUFFERs.
Kevin McCarthy [Fri, 28 Sep 2018 22:08:19 +0000 (15:08 -0700)]
Convert pgp_invoke_list_keys and mix_send_message to use BUFFERs.

Both repetitively perform a lot of copying back in forth, which is
much cleaner with a BUFFER.

Note that in pgp_invoke_list_keys, if there are no hints uids->data
would be NULL.  However, the pgp_invoke() checks and wraps all the
format substitutions with NONULL.

6 years agoChange imap_rename_mailbox to use a BUFFER.
Kevin McCarthy [Fri, 28 Sep 2018 21:22:09 +0000 (14:22 -0700)]
Change imap_rename_mailbox to use a BUFFER.

6 years agoIncrease buffer sizes for some IMAP commands.
Kevin McCarthy [Fri, 28 Sep 2018 00:29:16 +0000 (17:29 -0700)]
Increase buffer sizes for some IMAP commands.

Use to ensure assembled IMAP commands fit in the resultant buffer to
be imap_exec()'ed.

RFC2683 suggested a limit of 1000, but asked servers to accept up to
8000.  Furthermore, RFC7162 bumped the client limit suggestion up to
8192.  So I don't believe any issues will be caused by this.

Most of these are increases are just to remove theoretical truncation
warned about by the compiler; I don't believe we've had reports of
actual command truncation due to a mailbox 1024 characters long.

6 years agoFix non-threaded $sort_aux "reverse-" sorting.
Kevin McCarthy [Wed, 26 Sep 2018 02:03:56 +0000 (19:03 -0700)]
Fix non-threaded $sort_aux "reverse-" sorting.

The secondary sort was looking at (Sort & SORT_REVERSE) instead
of (SortAux & SORT_REVERSE), so wasn't even performing the reverse
based on the correct flag.

Additionally, afterwards, the primary sort was improperly applying a
reverse when the secondary sort returned non-zero.

Change SORTCODE() to look at SortAux when we are inside a secondary
sort.

Change AUXSORT() to return the result if the secondary sort returns
non-zero.  It is ugly to put a return inside the macro, but the check
for non-zero needs to be performed inside the AUXSORT if branch.

If the secondary sort returns 0, then the primary sort can still
compare index and apply a reverse as needed.

6 years agomerge: minor tidying
Richard Russon [Sat, 29 Sep 2018 23:14:38 +0000 (00:14 +0100)]
merge: minor tidying

 * boolify: account_match
 * rename header_cache_t vars
 * move file_get_size
 * docs: fix example
 * doxy: comment remaining parse functions
 * doxy: comment remaining connection functions

6 years agodoxy: comment remaining connection functions
Richard Russon [Sat, 29 Sep 2018 21:44:21 +0000 (22:44 +0100)]
doxy: comment remaining connection functions

6 years agodoxy: comment remaining parse functions
Richard Russon [Sat, 29 Sep 2018 18:44:06 +0000 (19:44 +0100)]
doxy: comment remaining parse functions

6 years agodocs: fix example
Richard Russon [Thu, 27 Sep 2018 19:37:43 +0000 (20:37 +0100)]
docs: fix example

6 years agomove file_get_size
Richard Russon [Thu, 27 Sep 2018 19:27:46 +0000 (20:27 +0100)]
move file_get_size

6 years agorename header_cache_t vars
Richard Russon [Thu, 27 Sep 2018 19:20:20 +0000 (20:20 +0100)]
rename header_cache_t vars

6 years agoboolify: account_match
Richard Russon [Thu, 27 Sep 2018 19:09:35 +0000 (20:09 +0100)]
boolify: account_match

6 years agomerge: minor tidying
Richard Russon [Fri, 28 Sep 2018 22:53:56 +0000 (23:53 +0100)]
merge: minor tidying

 * sync mutt_parse_mailboxes to other parse functions
 * refactor mutt_account_match
 * refactor mutt_conn_new()
 * mx_path_probe: export stat info
 * tidy code
 * add comments

6 years agoadd comments
Richard Russon [Fri, 28 Sep 2018 18:49:58 +0000 (19:49 +0100)]
add comments

6 years agotidy code
Richard Russon [Fri, 28 Sep 2018 19:20:10 +0000 (20:20 +0100)]
tidy code

6 years agomx_path_probe: export stat info
Richard Russon [Fri, 28 Sep 2018 18:46:57 +0000 (19:46 +0100)]
mx_path_probe: export stat info

6 years agorefactor mutt_conn_new()
Richard Russon [Fri, 28 Sep 2018 18:48:37 +0000 (19:48 +0100)]
refactor mutt_conn_new()

6 years agorefactor mutt_account_match
Richard Russon [Fri, 28 Sep 2018 19:10:53 +0000 (20:10 +0100)]
refactor mutt_account_match

6 years agosync mutt_parse_mailboxes to other parse functions
Richard Russon [Fri, 28 Sep 2018 16:04:58 +0000 (17:04 +0100)]
sync mutt_parse_mailboxes to other parse functions

6 years agomerge: tidy menu api functions
Richard Russon [Thu, 27 Sep 2018 00:03:26 +0000 (01:03 +0100)]
merge: tidy menu api functions

 * rename functions
 * document api functions
 * rename functions
 * unify api function params

6 years agomenu: unify api function params
Richard Russon [Wed, 26 Sep 2018 23:41:32 +0000 (00:41 +0100)]
menu: unify api function params

6 years agomenu: rename functions
Richard Russon [Wed, 26 Sep 2018 23:14:57 +0000 (00:14 +0100)]
menu: rename functions

6 years agomenu: document api functions
Richard Russon [Wed, 26 Sep 2018 23:01:30 +0000 (00:01 +0100)]
menu: document api functions

6 years agomenu: rename functions
Richard Russon [Wed, 26 Sep 2018 18:28:11 +0000 (19:28 +0100)]
menu: rename functions

6 years agomerge: upstream fixes
Richard Russon [Tue, 25 Sep 2018 13:03:59 +0000 (14:03 +0100)]
merge: upstream fixes

 * Change imap_conn_find() to always return an authenticated conn.
 * Free queries and alias_queries before exiting.
 * Remove purpose checks in smime_keys.pl verify step.
 * Send imap keepalives for interactive filters.
 * Add output during smime_keys purpose flag checking.
 * Increase user/pass field sizes in auth_login.

6 years agoIncrease user/pass field sizes in auth_login.
Kevin McCarthy [Sat, 22 Sep 2018 16:53:55 +0000 (09:53 -0700)]
Increase user/pass field sizes in auth_login.

account.pass was previously increased to 256 in cd421c13.  Also, the
buf should be bigger than the user+pass+"LOGIN", so bump it up too.

6 years agoAdd output during smime_keys purpose flag checking.
Kevin McCarthy [Sat, 22 Sep 2018 00:13:02 +0000 (17:13 -0700)]
Add output during smime_keys purpose flag checking.

6 years agoSend imap keepalives for interactive filters.
Kevin McCarthy [Tue, 18 Sep 2018 02:40:22 +0000 (19:40 -0700)]
Send imap keepalives for interactive filters.

When viewing attachments externally with a (non-copiousoutput) mailcap
entry missing %s, the command is invoked as a filter, with the
attachment piped into stdin.  However, unlike a filter, the user
interacts with the command, instead of just displaying the output in
the pager.

Just as with the mutt_system() command, Mutt needs to send imap
keepalives to keep those connections from closing during the
potentially extended invocation.

Thanks to John Hawkinson for the bug report, and his suggested patch,
which this commit is based upon.

6 years agoRemove purpose checks in smime_keys.pl verify step.
Kevin McCarthy [Fri, 14 Sep 2018 21:23:04 +0000 (14:23 -0700)]
Remove purpose checks in smime_keys.pl verify step.

The purpose checks are subsequently performed, and added as a field to
the .index.  In any case, it turns out passing multiple '-purpose'
arguments isn't even correct: openssl appears to just use the last
one.

Thanks to David J. Weller-Fahy for reporting the problem, and for
including a possible patch.

6 years agoFree queries and alias_queries before exiting.
Kevin McCarthy [Fri, 14 Sep 2018 21:21:04 +0000 (14:21 -0700)]
Free queries and alias_queries before exiting.

6 years agoChange imap_conn_find() to always return an authenticated conn.
Kevin McCarthy [Thu, 13 Sep 2018 01:23:00 +0000 (18:23 -0700)]
Change imap_conn_find() to always return an authenticated conn.

With the flag MUTT_IMAP_CONN_NONEW, it was already ensured the
connection would be authenticated.  However, without that flag, an
error in opening the connection or authentication would still return
an idata.

The callers that didn't bother to check the state were still assuming
authenticated, because they were all subseqeuently issuing an
"authenticated state" command to the server.

Rather than add state checks to every caller, just change the function
to return NULL if the idata did not end up in an authenticated state.

Remove the now redundant state checks in imap_open_mailbox() and
imap_get_mailbox().

6 years agorefactor/simplify status %f
Richard Russon [Tue, 25 Sep 2018 11:31:01 +0000 (12:31 +0100)]
refactor/simplify status %f

6 years agoboolify ImapMboxData data members
Richard Russon [Mon, 17 Sep 2018 15:06:53 +0000 (16:06 +0100)]
boolify ImapMboxData data members