]> granicus.if.org Git - neomutt/log
neomutt
5 years agoAdd account->enabled checks
Kevin McCarthy [Sat, 27 Jul 2019 22:34:51 +0000 (15:34 -0700)]
Add account->enabled checks

Add to ui recommendation, keylist generator, and autocrypt header
writing routines.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd prefer-encrypt prompt during account creation
Kevin McCarthy [Sat, 27 Jul 2019 22:11:38 +0000 (15:11 -0700)]
Add prefer-encrypt prompt during account creation

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd AUTOCRYPT header to imap fetch list
Kevin McCarthy [Sat, 27 Jul 2019 20:44:36 +0000 (13:44 -0700)]
Add AUTOCRYPT header to imap fetch list

If $autocrypt is set, add the header to make IMAP behave the same as
other formats (parsing on initial mailbox opening).

This will also be useful if we perform an initial scan during account
creation, to make that work for IMAP too.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd L10N translation message comments
Kevin McCarthy [Fri, 26 Jul 2019 23:27:04 +0000 (16:27 -0700)]
Add L10N translation message comments

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd autocrypt source files to POTFILES.in
Kevin McCarthy [Fri, 26 Jul 2019 23:00:22 +0000 (16:00 -0700)]
Add autocrypt source files to POTFILES.in

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoPrint an error message if an autocrypt key can't be found
Kevin McCarthy [Fri, 26 Jul 2019 22:59:47 +0000 (15:59 -0700)]
Print an error message if an autocrypt key can't be found

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoHandle autocrypt message decryption
Kevin McCarthy [Fri, 26 Jul 2019 20:55:46 +0000 (13:55 -0700)]
Handle autocrypt message decryption

Try autocrypt first for crypt_pgp_decrypt_mime() and
pgp_gpgme_encrypted_handler().

Propagate the autocrypt bit if successful.  This is used when replying
to an autocrypt message, to force a reply using autocrypt.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoSlightly improve the gossip header key update
Kevin McCarthy [Fri, 26 Jul 2019 02:12:32 +0000 (19:12 -0700)]
Slightly improve the gossip header key update

Don't set an empty peer.gossip_keydata with a value that matches the
current peer.keydata.  This just wastes space.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFix process_gossip_headers() to look at the right envelope
Kevin McCarthy [Thu, 25 Jul 2019 01:59:07 +0000 (18:59 -0700)]
Fix process_gossip_headers() to look at the right envelope

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAutocrypt outgoing emails
Kevin McCarthy [Sun, 21 Jul 2019 22:15:06 +0000 (15:15 -0700)]
Autocrypt outgoing emails

Change crypt_get_keys() to query autocrypt.

When oppenc_mode is set, we still query the original keyring
regardless, because the compose menu can still run oppenc even if
autocrypt is on.

Since mutt_autocrypt_ui_recommendation() checks each key as part of
making the recommendation, add a keylist parameter and use that
function.

Add gpgme changes to use the autocrypt context for encryption.

Postpone work:
* Change mutt_protect() to have a postpone parameter.  Remove the
  manual toggling of the SEC_SIGN bit outside the call when postponing.

* Since autocrypt doesn't set the SEC_SIGN bit, this allows us to turn off
  signing inside mutt_protect() for both normal and autocrypt mode.

* Set the autocrypt postpone key in AutocryptDefaultKey.

Write autocrypt and gossip headers in outgoing emails.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd autocrypt line to the compose menu
Kevin McCarthy [Fri, 19 Jul 2019 19:54:32 +0000 (12:54 -0700)]
Add autocrypt line to the compose menu

Remove the hardcoded HDR_ATTACH offset calcuation, and add an explicit
enum for the "-- Attachments" line to make loops and padding array
sizes easier.

Add security and recommendataion fields on the line.

Add mutt_autocrypt_ui_recommendation, following the autocrypt spec
guidelines.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd another struct Email security bit for autocrypt
Kevin McCarthy [Sat, 20 Jul 2019 21:48:06 +0000 (14:48 -0700)]
Add another struct Email security bit for autocrypt

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoChange gossip header address comparison to use normalized addresses
Kevin McCarthy [Thu, 18 Jul 2019 20:22:52 +0000 (13:22 -0700)]
Change gossip header address comparison to use normalized addresses

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoChange autocrypt_db normalization to return struct Address
Kevin McCarthy [Thu, 18 Jul 2019 20:19:47 +0000 (13:19 -0700)]
Change autocrypt_db normalization to return struct Address

This makes reusing the code in autocrypt.c easier.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd gossip header processing
Kevin McCarthy [Tue, 16 Jul 2019 01:36:57 +0000 (18:36 -0700)]
Add gossip header processing

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert to use sqlite3_prepare_v3()
Kevin McCarthy [Mon, 15 Jul 2019 01:59:28 +0000 (18:59 -0700)]
Convert to use sqlite3_prepare_v3()

The documentation suggests the SQLITE_PREPARE_PERSISTENT flag is
helpful for long-lived prepared statements, and Mutt is using.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoProcess autocrypt headers
Kevin McCarthy [Fri, 12 Jul 2019 01:45:45 +0000 (18:45 -0700)]
Process autocrypt headers

Create/update peer database accounts and gpg keys based on the headers.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd autocrypt header parsing to mutt_parse_rfc822_line()
Kevin McCarthy [Fri, 12 Jul 2019 01:06:56 +0000 (18:06 -0700)]
Add autocrypt header parsing to mutt_parse_rfc822_line()

Convert parse_parameters() for autocrypt header usage:

  * change to use a struct Buffer to accomodate large autocrypt keydata
    attribute values.

  * Autocrypt header parameters are not rfc2231 compliant.  Rather
    than rolling another very similar function, just change the
    existing one to allow space separation.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd initial autocrypt account setup
Kevin McCarthy [Tue, 9 Jul 2019 03:58:32 +0000 (20:58 -0700)]
Add initial autocrypt account setup

Generate gpg key and add account record to the database.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFactor out mutt_edit_address() in send.c
Kevin McCarthy [Mon, 8 Jul 2019 22:23:44 +0000 (15:23 -0700)]
Factor out mutt_edit_address() in send.c

For reuse by autocrypt for address prompts.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoStart autocrypt gpgme
Kevin McCarthy [Sun, 7 Jul 2019 21:37:52 +0000 (14:37 -0700)]
Start autocrypt gpgme

Add a basic init function.

Bump up the required gpgme version to 1.8.0 if autocrypt is enabled.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd database and schema initialization
Kevin McCarthy [Sat, 6 Jul 2019 21:01:13 +0000 (14:01 -0700)]
Add database and schema initialization

Add mutt_mkdir() library function supporting recursive mkdir.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd autocrypt config vars
Kevin McCarthy [Sat, 6 Jul 2019 18:35:22 +0000 (11:35 -0700)]
Add autocrypt config vars

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoInitial autoconf and makefile setup for autocrypt
Kevin McCarthy [Thu, 4 Jul 2019 02:51:09 +0000 (19:51 -0700)]
Initial autoconf and makefile setup for autocrypt

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agobuild: add autocrypt option
Richard Russon [Sun, 4 Aug 2019 18:00:34 +0000 (19:00 +0100)]
build: add autocrypt option

5 years agoaddress: add mutt_addr_to_intl()
Richard Russon [Tue, 6 Aug 2019 14:46:50 +0000 (15:46 +0100)]
address: add mutt_addr_to_intl()

5 years agomerge: upstream fixes
Richard Russon [Mon, 19 Aug 2019 23:14:00 +0000 (00:14 +0100)]
merge: upstream fixes

 * docs: Refer to NeoMutt
 * Add checks for buffered OpenSSL or GnuTLS data when polling
 * Fix LibreSSL build
 * Add size display configuration variables
 * test: remove mutt_str_pretty_size()
 * Add $ssl_use_tlsv1_3 config variable, default set

5 years agoAdd $ssl_use_tlsv1_3 config variable, default set
Kevin McCarthy [Sat, 17 Aug 2019 22:38:34 +0000 (15:38 -0700)]
Add $ssl_use_tlsv1_3 config variable, default set

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agotest: remove mutt_str_pretty_size()
Richard Russon [Mon, 19 Aug 2019 22:42:06 +0000 (23:42 +0100)]
test: remove mutt_str_pretty_size()

mutt_str_pretty_size() now relies on four config variables, so it's been
demoted to muttlib.c.  When it's been converted to use flags instead of
config variables, it can be returned to the library.

5 years agoAdd size display configuration variables
Kevin McCarthy [Fri, 28 Jun 2019 22:09:51 +0000 (15:09 -0700)]
Add size display configuration variables

Although it would be nice to "open this up" more, performance and
security/stability issues would arise.

Based on the thread in mutt-dev, I hope these vars will satisfy most
customization needs:
  $size_show_bytes
  $size_show_mb
  $size_show_fractions
  $size_units_on_left

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFix LibreSSL build
Kevin McCarthy [Wed, 14 Aug 2019 04:03:51 +0000 (21:03 -0700)]
Fix LibreSSL build

Apparently LibreSSL doesn't implement SSL_has_pending(), even for
newer versions.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd checks for buffered OpenSSL or GnuTLS data when polling
Kevin McCarthy [Sun, 28 Jul 2019 14:54:32 +0000 (07:54 -0700)]
Add checks for buffered OpenSSL or GnuTLS data when polling

I don't believe this has had an actual effect, because NeoMutt doesn't
support renegotiation, and we are only polling immediately after
sending NOOP.

However, it looks like checking is technically the correct thing to do
to avoid polling waiting for data that is already buffered.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agodocs: Refer to NeoMutt
Richard Russon [Mon, 19 Aug 2019 21:58:14 +0000 (22:58 +0100)]
docs: Refer to NeoMutt

5 years agoFix parsing of GnuPG output
Scott Kostyshak [Sun, 18 Aug 2019 17:07:26 +0000 (13:07 -0400)]
Fix parsing of GnuPG output

In GnuPG output there is a space after "[GNUPG:]". If the space is
not taken into account, the rest of the parsing fails, e.g., because
the variable "line" starts with " BEGIN_DECRYPTION" instead of the
expected "BEGIN_DECRYPTION".

This commit restores the previous parsing functionality. It appears
that the number of spaces does not differ among GnuPG versions.
However, if we wanted to make the code robust to varying amount of
space following "[GNUPG:]", we could either trim the whitespace from
the beginning or take it into account with mutt_str_lws_len().

This commit fixes a regression introduced at c2aa0c06.

5 years agoIncrease length of attachment pipe command
Alyssa Ross [Sun, 18 Aug 2019 10:07:17 +0000 (10:07 +0000)]
Increase length of attachment pipe command

This matches the length of the pipe command for messages, and is much
less likely to be hit accidentally.

5 years agonotmuch: sort headers on interrupted read
Austin Ray [Mon, 12 Aug 2019 21:42:47 +0000 (17:42 -0400)]
notmuch: sort headers on interrupted read

Commit 45639e4 breaks partial notmuch mailbox loads. If a notmuch mailbox is
interrupted while loading, the index will be empty. To resolve this, add back
the 'mutt_sort_headers()' for the interrupted read case.

5 years agoUse Buffer instead of raw char* in pop
Pietro Cerutti [Mon, 12 Aug 2019 13:08:49 +0000 (13:08 +0000)]
Use Buffer instead of raw char* in pop

5 years agoChange OptIgnoreMacroEvents to ignore macros
Oneric [Fri, 26 Jul 2019 11:54:12 +0000 (13:54 +0200)]
Change OptIgnoreMacroEvents to ignore macros

Change OptIgnoreMacroEvents to actuallly ignore macros instead of
throwing errors.

Add a comment to the OptIgnoreMacroEvents km_dokey() change

The option was added in commit 53900afa, and its actual purpose was
to separate out an "unget" event buffer from the "macro" buffer, to
solve a problem with certificate prompts.

The safest approach in a low-level function like km_dokey() was to
return an error if new macros were generated when the option is set.
However, this results in an unbuffered username/password prompt being
aborted.

Currently the only users of unbuffered input are the SSL certificate
prompts, which use menu->dialog mode (and thus mutt_getch() directly)
and username/password prompts.  So the only affected cases are
editor-menu prompts, and returning the pressed keys is likely less
surprising than aborting the prompt.

If other unbuffered menus are created in the future, we may want to
add a check for which menu mode is being used.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdded * option to unattachments command
Andrew Marks [Fri, 5 Jul 2019 15:44:21 +0000 (08:44 -0700)]
Added * option to unattachments command

The * option clears all previous attachments settings.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agonotmuch: ensure message_id is correct 1797/head
Austin Ray [Sat, 3 Aug 2019 20:34:32 +0000 (16:34 -0400)]
notmuch: ensure message_id is correct

The notmuch-backend initializes a provided email struct with content
from notmuch. In rare instances, a provided email struct has a
message_id that does not match the one from notmuch. No validation to
ensure message_ids match is performed.

An issue occurs when running nm_mbox_check(), which stores all messages
in a hash table. The incorrect message_id is the key so our email is
considered missing, reloaded into the mailbox, and a duplicate appears
in the index. This triggers a warning from neomutt regarding external
modification.

Instead, validate the message_ids to ensure a match so our hash table
keys are correct. As a result, a reload is no longer performed and
neomutt's warning need not occur.

Fixes #1793

5 years agoRevert "mime_lookup: use compose mailcap entries when replying"
Pietro Cerutti [Fri, 2 Aug 2019 11:16:14 +0000 (11:16 +0000)]
Revert "mime_lookup: use compose mailcap entries when replying"

This reverts commit 672a84d9c4110343ab4d43d542b0c0933365d023.

5 years agomerge: preparation for window improvements
Richard Russon [Wed, 31 Jul 2019 12:05:47 +0000 (13:05 +0100)]
merge: preparation for window improvements

 * pager: tidy code
 * window: drop unused functions
 * window: don't pass a Window when an int will do
 * window: add new() and free()

5 years agowindow: add new() and free()
Richard Russon [Wed, 24 Jul 2019 11:36:16 +0000 (12:36 +0100)]
window: add new() and free()

5 years agowindow: don't pass a Window when an int will do
Richard Russon [Thu, 25 Jul 2019 14:22:33 +0000 (15:22 +0100)]
window: don't pass a Window when an int will do

5 years agowindow: drop unused functions
Richard Russon [Sat, 27 Jul 2019 19:07:20 +0000 (20:07 +0100)]
window: drop unused functions

5 years agopager: tidy code
Richard Russon [Thu, 25 Jul 2019 14:52:32 +0000 (15:52 +0100)]
pager: tidy code

5 years agoreflow multiline prompts correctly
Richard Russon [Tue, 30 Jul 2019 12:57:33 +0000 (13:57 +0100)]
reflow multiline prompts correctly

When asking the user a long question, NeoMutt can expand the message
window up to three lines.

This fixes two problems with multiline prompts:

- `mutt_window_reflow()` was resizing the windows when it shouldn't

- coloured (shortened) prompts weren't being measured correctly
  (causing unnecessary wrapping)

5 years agoRefactor regex with custom wrapper 1780/head
Simon Symeonidis [Fri, 19 Jul 2019 19:02:28 +0000 (15:02 -0400)]
Refactor regex with custom wrapper

5 years agomutt_sort_headers appens in ctx_update, no need to call it again
Pietro Cerutti [Thu, 25 Jul 2019 07:45:24 +0000 (07:45 +0000)]
mutt_sort_headers appens in ctx_update, no need to call it again

5 years agofix printf format strings
Richard Russon [Wed, 24 Jul 2019 20:07:07 +0000 (21:07 +0100)]
fix printf format strings

The logging functions use a printf formatting string, but unfortunately
the compiler can't automatically detect errors because of our use of
macros.

5 years agoRemove uninitialized char array buf
Zero King [Wed, 24 Jul 2019 18:27:43 +0000 (18:27 +0000)]
Remove uninitialized char array buf

5 years agodrop unused summary menu
Richard Russon [Tue, 23 Jul 2019 22:40:26 +0000 (23:40 +0100)]
drop unused summary menu

5 years agoRemove duplicate conditional expressions
Zero King [Wed, 24 Jul 2019 17:24:32 +0000 (17:24 +0000)]
Remove duplicate conditional expressions

5 years agoFix struct Buffer used as %s 1787/head
Zero King [Wed, 24 Jul 2019 16:51:12 +0000 (16:51 +0000)]
Fix struct Buffer used as %s

cmd is a Buffer struct, it does not correspond to %s in the format
string.

5 years agoHonour a Mailbox's hidden flag in the browser
Pietro Cerutti [Tue, 23 Jul 2019 13:22:38 +0000 (13:22 +0000)]
Honour a Mailbox's hidden flag in the browser

5 years agoUpdate to latest autosetup and bundled JimTcl
Pietro Cerutti [Tue, 23 Jul 2019 08:10:49 +0000 (08:10 +0000)]
Update to latest autosetup and bundled JimTcl

5 years agoUpdate to latest acutest.h
Pietro Cerutti [Tue, 23 Jul 2019 08:05:47 +0000 (08:05 +0000)]
Update to latest acutest.h

5 years agoFix browsing an IMAP backend
Pietro Cerutti [Mon, 22 Jul 2019 11:37:23 +0000 (11:37 +0000)]
Fix browsing an IMAP backend

Fixes #1783

5 years agomerge: light refactoring
Richard Russon [Sat, 20 Jul 2019 22:18:23 +0000 (23:18 +0100)]
merge: light refactoring

 * test: sync mutt_extract_token()
 * drop Buffer.destroy
 * refactor: Mailbox in mutt_display_message()
 * pager: reorganised the code
 * context: tidy for clarity
 * context: add notifications
 * notify: use data to match specific callbacks

5 years agonotify: use data to match specific callbacks
Richard Russon [Sat, 20 Jul 2019 12:48:19 +0000 (13:48 +0100)]
notify: use data to match specific callbacks

When removing a notification callback, check both the function and data
pointers.

This means we can reuse a single callback function with multiple data
objects.

5 years agocontext: add notifications
Richard Russon [Fri, 19 Jul 2019 13:51:46 +0000 (14:51 +0100)]
context: add notifications

Prepare for more Context refactoring by supporting notifications on the
Context object.

5 years agocontext: tidy for clarity
Richard Russon [Fri, 19 Jul 2019 11:09:37 +0000 (12:09 +0100)]
context: tidy for clarity

- rename msgnotreadyet
- insert whitespace into header

5 years agopager: reorganised the code
Richard Russon [Fri, 19 Jul 2019 12:38:03 +0000 (13:38 +0100)]
pager: reorganised the code

Move all the data, defines and structs to the top of the file, where
they're more discoverable.

5 years agorefactor: Mailbox in mutt_display_message()
Richard Russon [Fri, 19 Jul 2019 10:54:11 +0000 (11:54 +0100)]
refactor: Mailbox in mutt_display_message()

Pass the Mailbox into mutt_display_message() rather than relying on
Context->mailbox.

5 years agodrop Buffer.destroy
Richard Russon [Fri, 19 Jul 2019 21:48:51 +0000 (22:48 +0100)]
drop Buffer.destroy

This member controlled whether, when destroyed, a Buffer should delete
its data.  The member was only used in a couple of places, so it seems
better to duplicate the data in those cases and *always* destroy it
afterwards.

5 years agotest: sync mutt_extract_token()
Richard Russon [Fri, 19 Jul 2019 17:29:56 +0000 (18:29 +0100)]
test: sync mutt_extract_token()

The test code needs a private copy of mutt_extract_token().
Update the copy to match the latest code.

5 years agonntp: fix leaks
Richard Russon [Thu, 18 Jul 2019 16:23:54 +0000 (17:23 +0100)]
nntp: fix leaks

5 years agonntp: remove old Context references
Richard Russon [Thu, 18 Jul 2019 16:23:17 +0000 (17:23 +0100)]
nntp: remove old Context references

5 years agosmime: factor out context
Richard Russon [Thu, 18 Jul 2019 13:02:48 +0000 (14:02 +0100)]
smime: factor out context

5 years agoaddrlist: fix empty string
Richard Russon [Thu, 18 Jul 2019 12:41:24 +0000 (13:41 +0100)]
addrlist: fix empty string

5 years agonotify: fix shutdown order
Richard Russon [Thu, 18 Jul 2019 14:58:00 +0000 (15:58 +0100)]
notify: fix shutdown order

Free the Notify object after we free anyone who might use it.

5 years agoboolify monitor
Richard Russon [Wed, 17 Jul 2019 22:01:06 +0000 (23:01 +0100)]
boolify monitor

5 years agocontext: crypt_extract_keys_from_messages()
Richard Russon [Wed, 17 Jul 2019 13:33:19 +0000 (14:33 +0100)]
context: crypt_extract_keys_from_messages()

Change crypt_extract_keys_from_messages() to use a Context parameter
rather than the global.

5 years agonntp: fix refactoring bugs
Richard Russon [Wed, 17 Jul 2019 15:36:04 +0000 (16:36 +0100)]
nntp: fix refactoring bugs

- fix cli startup
- fix mailbox ptr
- fix change-folder

5 years agoemail: add events
Richard Russon [Mon, 15 Jul 2019 10:49:53 +0000 (11:49 +0100)]
email: add events

5 years agoiwyu: tidy more #includes
Richard Russon [Wed, 17 Jul 2019 01:10:53 +0000 (02:10 +0100)]
iwyu: tidy more #includes

5 years agomerge: trivial tidying
Richard Russon [Tue, 16 Jul 2019 21:43:12 +0000 (22:43 +0100)]
merge: trivial tidying

 * doxygen: fix comments
 * fix whitespace
 * rename mutt_emaillist_free() to _clear()
 * drop unused maildir_update_tables()
 * de-Context nntp_check_msgid()
 * de-Context nntp_check_children()
 * boolify imap_next_word()
 * rename dreadful local
 * email: shorten function names
 * rename ParameterList variables
 * unify private data free functions
 * hash: pick some better variable names
 * iwyu: tidy #includes

5 years agoiwyu: tidy #includes
Richard Russon [Tue, 16 Jul 2019 21:04:02 +0000 (22:04 +0100)]
iwyu: tidy #includes

5 years agohash: pick some better variable names
Richard Russon [Tue, 16 Jul 2019 20:14:50 +0000 (21:14 +0100)]
hash: pick some better variable names

5 years agounify private data free functions
Richard Russon [Tue, 16 Jul 2019 19:44:32 +0000 (20:44 +0100)]
unify private data free functions

5 years agorename ParameterList variables
Richard Russon [Tue, 16 Jul 2019 18:33:14 +0000 (19:33 +0100)]
rename ParameterList variables

5 years agoemail: shorten function names
Richard Russon [Tue, 16 Jul 2019 18:25:21 +0000 (19:25 +0100)]
email: shorten function names

5 years agorename dreadful local
Richard Russon [Tue, 16 Jul 2019 18:13:07 +0000 (19:13 +0100)]
rename dreadful local

5 years agoboolify imap_next_word()
Richard Russon [Tue, 16 Jul 2019 18:07:38 +0000 (19:07 +0100)]
boolify imap_next_word()

5 years agode-Context nntp_check_children()
Richard Russon [Tue, 16 Jul 2019 17:11:54 +0000 (18:11 +0100)]
de-Context nntp_check_children()

5 years agode-Context nntp_check_msgid()
Richard Russon [Tue, 16 Jul 2019 17:08:38 +0000 (18:08 +0100)]
de-Context nntp_check_msgid()

5 years agodrop unused maildir_update_tables()
Richard Russon [Tue, 16 Jul 2019 17:00:17 +0000 (18:00 +0100)]
drop unused maildir_update_tables()

5 years agorename mutt_emaillist_free() to _clear()
Richard Russon [Mon, 15 Jul 2019 17:36:16 +0000 (18:36 +0100)]
rename mutt_emaillist_free() to _clear()

The function doesn't free the Emails, just the list, so rename it to
match similar functions.

5 years agofix whitespace
Richard Russon [Mon, 15 Jul 2019 16:47:20 +0000 (17:47 +0100)]
fix whitespace

5 years agodoxygen: fix comments
Richard Russon [Sun, 14 Jul 2019 01:05:06 +0000 (02:05 +0100)]
doxygen: fix comments

5 years agomerge: upstream fixes
Richard Russon [Mon, 15 Jul 2019 21:37:03 +0000 (22:37 +0100)]
merge: upstream fixes

Sync to upstream: 82973a6e

 * change Command to use intptr_t
 * Don't read or save history if $history_file isn't set
 * Omit User-Agent: header by default
 * Remove unnecessary checks for strings
 * Convert $header_cache_pagesize to type DT_LONG

5 years agoConvert $header_cache_pagesize to type DT_LONG
Kevin McCarthy [Thu, 27 Jun 2019 18:06:19 +0000 (11:06 -0700)]
Convert $header_cache_pagesize to type DT_LONG

Prior to commit 4bc76c2f there was no LNUM type, and so the workaround
was to store it as a string, converting in the hcache_open_gdbm()
call.

This will not affect the user interface or config file, because DT_NUM
and DT_LNUM read in a string from the config file and convert to a
number.  Quotes are used for escaping style, not passed through to the
variable setter.

So essentially this simply moves the conversion to parse_set(), and
provides feedback for a non-numeric type immediately.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoRemove unnecessary checks for strings
Kevin McCarthy [Thu, 27 Jun 2019 22:35:12 +0000 (15:35 -0700)]
Remove unnecessary checks for strings

MuttVars of those types are set via safe_strdup(), which returns NULL
if the original is "".  Thus Var implies *Var.

A good portion of the code relies on that axiom, but over the years
some (Var && *Var) checks have crept in, including from me.

This was partially because of the INITVAL("") that were in the code,
which implied (incorrectly) the initial value could be "".  Commit
2f91d43e removed those to make it more clear.

This commit removes the *Var checks to make it even clearer, and help
avoid them creeping back in again.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoOmit User-Agent: header by default
Daniel Kahn Gillmor [Sun, 14 Jul 2019 01:49:05 +0000 (21:49 -0400)]
Omit User-Agent: header by default

The User-Agent: header can be fun and interesting and useful for
debugging, but it also leaks quite a bit of information about the user
and their software stack.

This represents a potential security risk (attackers can target the
particular stack) and also an anonymity risk (a user trying to
preserve their anonymity by sending mail from a non-associated account
might reveal quite a lot of information if their choice of mail user
agent is exposed).

Users who want to configure `user_agent` to `yes` can still do so, but
it makes sense to have safer defaults.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoDon't read or save history if $history_file isn't set
Kevin McCarthy [Fri, 28 Jun 2019 19:57:24 +0000 (12:57 -0700)]
Don't read or save history if $history_file isn't set

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agochange Command to use intptr_t
Richard Russon [Mon, 15 Jul 2019 19:36:40 +0000 (20:36 +0100)]
change Command to use intptr_t

5 years agofix browser attach
Richard Russon [Mon, 15 Jul 2019 16:24:40 +0000 (17:24 +0100)]
fix browser attach

5 years agosync translations
Richard Russon [Mon, 15 Jul 2019 15:32:04 +0000 (16:32 +0100)]
sync translations

5 years agofix re-opening attachments
Richard Russon [Sun, 23 Jun 2019 12:24:40 +0000 (13:24 +0100)]
fix re-opening attachments

When opening an attachment with a two part suffix, e.g. `.tar.gz`
NeoMutt created a temporary file with just `.gz`.

Hack the splitting logic to give a useful suffix

Fixes: #1699
5 years agoAvoid implicit conversion between bool and quadopt
Federico Kircheis [Sun, 14 Jul 2019 07:24:09 +0000 (09:24 +0200)]
Avoid implicit conversion between bool and quadopt

Make the conversion between `bool and `QuadOption` explicit, and avoid
depending on the underlying `enum` value.

Also state that `mutt_yesorno` works correctly for `MUTT_YES` and `MUTT_NO`