Age | Commit message (Collapse) | Author |
|
The result of
find . -name "*.[ch]" -exec emacs -batch {} \
--eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
|
|
Gmail supports RFC 7628 for using OAUTH with IMAP, and they really don't
like you using password based auth. You can still enable "less secure
apps" and then generate an application specific password, but I figured it
was time to support it.
Being mutt, I punted on some of the "hard" work to an external script, ie
getting/refreshing the OAUTH tokens. This avoids the issue of how do you
have a client-id and client-secret for an open source project, and the fact
that OAUTH discovery is still nascent, so you'd likely need separate things
for each of the providers.
At least for Gmail, you can use the oauth2.py script from Google's
gmail-oauth2-tools:
https://github.com/google/gmail-oauth2-tools/blob/master/python/oauth2.py
You'd need to get your own oauth client credentials for Gmail here:
https://console.developers.google.com/apis/credentials
Then, you'd use oauth2.py with --generate_oauth2_token to get a refresh
token, and configure mutt with:
set imap_authenticators="oauthbearer"
set imap_user="<email_address>"
set imap_pass=`/path/to/oauth2.py --quiet --user=<email_address>
--client_id=<client_id> --client_secret=<client_secret>
--refresh_token=<refresh_token>`
For this patch, I didn't add any new configuration, but I'm open to
suggestions on that.
The patch also only support SASL-IR to reduce round-trips to the server,
but it's certainly possible to change that if we think there are
OAUTHBEARER IMAP servers that don't support SASL-IR. It also requires the
connection to be encrypted as the access token is re-usable for an hour or
so. Again, Gmail only allows encrypted IMAP connections, not sure if any
OAUTHBEARER services allow non-encrypted.
Turns out that auth failure leaves you in SASL mode, so I have a hack to
issue a noop command on error. Not sure if that's just OAUTHBEARER
oddness, or whether I should be using lower level mutt imap functions.
|
|
Vincent Lefèvre pointed out the common shortcut, e.g 1996-9, is
actually not allowed for copyright years. Convert all the copyright
years (for mutt files) to use 4 digits.
|
|
Many structs used in mutt are actually constant but are defined
without the 'const' keyword. This can slow initialization (slightly)
in some environments due to extra copying and increases the amount of
writable RAM required at run-time, which can be significant on non-MMU
systems. Using const can also increase the opportunities for compiler
optimization.
The attached patch marks many such structures as const. On my test x86
build, this reduces the size of .data by over 50%.
|
|
|
|
|
|
|
|
Remove it from mutt.h
|
|
probably be done to every C file, but the results need testing in case
some files depend on the current (broken) includes.
|
|
|
|
|
|
|
|
before 1.4. It creates a new config variable $imap_authenticators,
which is a comma-separated list of authentication methods for mutt
to try to use to authenticate to an IMAP server. If it is
unspecified you get the old behaviour - any method is tried, the
first to succeed or fail ends the auth loop.
(From Brendan Cully.)
|
|
|
|
|
|
|
|
|
|
Komulainen, and most likely based on input from Vsevolod Voykov
(sp?).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* should fix mutt segfaulting when trying to open {}
* helps with the problem of mutt detecting new mail in the wrong
folder. Now, IMAP commands from the SELECTED state should call
imap_cmd_finish after they've executed commands. I've only put
this is imap_buffy_check for now - in my opinion the command
execution path is still not stable, and rewrites may obviate the
need for this...
(From: Brendan Cully <brendan@kublai.com>)
|
|
|
|
|
|
methods. This is, for instance, needed to access the cyrus-related
mailing lists' archives at CMU.
|
|
|
|
* changes mutt_buffy_check to only poll the selected folder when it
is opened, not all mailboxes (unless the timeout has expired).
This is a noticeable win if you have a few IMAP mailboxes.
* sets the default checkinterval to 60 seconds from 0. Things are
much much slower with 0.
* makes some cosmetic renames
* moves lots of generic imap stuff into a separate file, imap/util.c
* abstracts the process of sending a command to an IMAP server a bit
better (lots more to do here, though).
* moves the message-set creation code used by the new fastdelete
code into its own function, since it is generally useful.
* implements server-side copy of messages. Tagged messages are
copied in one command, thanks to the message-set function. Speedy!
(From: Brendan Cully; modifications by tlr.)
|
|
|
|
|
|
|