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
# ~ expansion also works
draft_box = maildir://~/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
-
alias_regexp
a regex for catching further aliases (like + extensions).
- Type
string
- Default
None
-
aliases
used to clear your addresses/ match account when formatting replies
- Type
string list
- Default
,
-
case_sensitive_username
Whether the server treats the address as case-senstive or case-insensitve (True for the former, False for the latter)
Note
The vast majority (if not all) SMTP servers in modern use treat usernames as case insenstive, you should only set this if you know that you need it.
- Type
boolean
- Default
False
-
draft_box
where to store draft mails, e.g. maildir:///home/you/mail/Drafts or maildir://~/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
-
draft_tags
list of tags to automatically add to draft messages
- Type
string list
- Default
draft
-
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.
Deprecated since version 0.4: The values True and False are interpreted as all and none respectively. 0, 1, true, True, false, False, yes, Yes, no, No, will be removed before 1.0, please move to all, none, or trusted.
- Type
option, one of [‘all’, ‘none’, ‘trusted’, ‘True’, ‘False’, ‘true’, ‘false’, ‘Yes’, ‘No’, ‘yes’, ‘no’, ‘1’, ‘0’]
- Default
none
-
encrypt_to_self
If this is true when encrypting a message it will also be encrypted with the key defined for this account.
Warning
Before 0.6 this was controlled via gpg.conf.
- Type
boolean
- Default
True
-
gpg_key
The GPG key ID you want to use with this account.
- Type
string
- Default
None
-
message_id_domain
Domain to use in automatically generated Message-ID headers. The default is the local hostname.
- Type
string
- Default
None
-
passed_tags
list of tags to automatically add to passed messages
- Type
string list
- Default
passed
-
realname
used to format the (proposed) From-header in outgoing mails
- Type
string
-
replied_tags
list of tags to automatically add to replied messages
- Type
string list
- Default
replied
-
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 or maildir://~/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
-
sent_tags
list of tags to automatically add to outgoing messages
- Type
string list
- Default
sent
-
sign_by_default
Outgoing messages will be GPG signed by default if this is set to True.
- Type
boolean
- Default
False
-
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