3.2. Accounts¶
In order to be able to send mails, you have to define at least one account subsection in your config: There needs to be a section “accounts”, and each subsection, indicated by double square brackets defines an account.
Here is an example configuration
[accounts]
[[work]]
realname = Bruce Wayne
address = b.wayne@wayneenterprises.com
alias_regexp = b.wayne\+.+@wayneenterprises.com
gpg_key = D7D6C5AA
sendmail_command = msmtp --account=wayne -t
sent_box = maildir:///home/bruce/mail/work/Sent
draft_box = maildir:///home/bruce/mail/work/Drafts
[[secret]]
realname = Batman
address = batman@batcave.org
aliases = batman@batmobile.org,
sendmail_command = msmtp --account=batman -t
signature = ~/.batman.vcf
signature_as_attachment = True
Warning
Sending mails is only supported via a sendmail shell command for now. If you want to use a sendmail command different from sendmail -t, specify it as sendmail_command.
The following entries are interpreted at the moment:
-
address
- your main email address
Type: string
-
realname
- used to format the (proposed) From-header in outgoing mails
Type: string
-
aliases
- used to clear your addresses/ match account when formatting replies
Type: string list Default: ,
-
alias_regexp
- a regex for catching further aliases (like + extensions).
Type: string Default: None
-
sendmail_command
- sendmail command. This is the shell command used to send out mails via the sendmail protocol
Type: string Default: “sendmail -t”
-
sent_box
where to store outgoing mails, e.g. maildir:///home/you/mail/Sent. You can use mbox, maildir, mh, babyl and mmdf in the protocol part of the URL.
Note
If you want to add outgoing mails automatically to the notmuch index you must use maildir in a path within your notmuch database path.
Type: mail_container Default: None
-
draft_box
where to store draft mails, e.g. maildir:///home/you/mail/Drafts. You can use mbox, maildir, mh, babyl and mmdf in the protocol part of the URL.
Note
You will most likely want drafts indexed by notmuch to be able to later access them within alot. This currently only works for maildir containers in a path below your notmuch database path.
Type: mail_container Default: None
-
sent_tags
- list of tags to automatically add to outgoing messages
Type: string list Default: sent,
-
signature
- path to signature file that gets attached to all outgoing mails from this account, optionally renamed to signature_filename.
Type: string Default: None
-
signature_as_attachment
- attach signature file if set to True, append its content (mimetype text) to the body text if set to False.
Type: boolean Default: False
-
signature_filename
- signature file’s name as it appears in outgoing mails if signature_as_attachment is set to True
Type: string Default: None
-
sign_by_default
- Outgoing messages will be GPG signed by default if this is set to True.
Type: boolean Default: False
-
encrypt_by_default
Alot will try to GPG encrypt outgoing messages by default when this is set to all or trusted. If set to all the message will be encrypted for all recipients for who a key is available in the key ring. If set to trusted it will be encrypted to all recipients if a trusted key is available for all recipients (one where the user id for the key is signed with a trusted signature).
Note
If the message will not be encrypted by default you can still use the toggleencrypt, encrypt and unencrypt commands to encrypt it.
Note
The values True and False are interpreted as all and none respectively. They are kept for backwards compatibility to give users a change to migrate to the new option type. They might become deprecated in future versions.
Type: option, one of [‘all’, ‘none’, ‘trusted’, ‘True’, ‘False’, ‘true’, ‘false’, ‘Yes’, ‘No’, ‘yes’, ‘no’, ‘1’, ‘0’] Default: none
-
gpg_key
- The GPG key ID you want to use with this account. If unset, alot will use your default key.
Type: string Default: None