When the matching imapAuth or smtpAuth is oauthbearer or xoauth2, a
non-null client_secret is URL-encoded into the source or outgoing URL
in accounts.conf, which is a world-readable Nix store file. Say so in
the option description.
The access or refresh token does not need to be in that file. The
module sets source-cred-cmd and outgoing-cred-cmd from passwordCommand,
and aerc uses the command's output as the access token, or as the
refresh token when token_endpoint is set. Say that too.
The descriptions hard-coded $HOME/.config/aerc, which is wrong on
Darwin without xdg.enable. Describe the directory once in extraConfig,
together with the unsafe-accounts-conf setting that a generated
accounts.conf needs, and link the other options to it.
`literalExpression` is intended just to signify code that needs to stay
a string that gets represented exactly as-is for docs. It has been
misused heavily and people get confused repeatedly on when or not to use
it because of the rampant misuse.
Usernames containing special characters like '@' were included
verbatim in IMAP/SMTP URLs, producing invalid URIs. Apply
'lib.strings.escapeURL' to the username so that these characters
are properly encoded.
Currently enabling aerc in accounts.email.accounts.<account> doesn't handle existing configs where accounts.email.accounts.<account>.notmuch.enable is set to true. This pr proposes to automatically set notmuch as backend for aerc if this is the case, see rjarry/aerc@master/doc/aerc-notmuch.5.scd.
For set-ups where accounts.email.notmuch.enable has been enabled this was previously ignored, so this is probably a breaking change for these configs, but from running this set up during the last weeks I would consider the upside of better search and filtering performance as significantly larger than the minor changes in query handling as noted here rjarry/aerc@master/doc/aerc-notmuch.5.scd#usage.
Allow a user to disable an email account by setting
`accounts.email.accounts.<name>.enable = false`. This is useful if
someone wants to configure email accounts globally but only use them in
certain circumstances.
Everywhere email account configuration is used, check if the account is
enabled before checking any attributes of the account.
Reduce maintenance burden and increase efficiency by automatically
importing modules following a specific convention.
Co-authored-by: awwpotato <awwpotato@voidq.com>
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>