-
-
Notifications
You must be signed in to change notification settings - Fork 65
Astroid setup
Astroid needs some information to start with. You can setup Astroid, provided you already have notmuch working (if not, see our introduction to notmuch).
If you have not compiled and installed Astroid yet, refer to: Compiling and Installing.
Astroid uses the $XDG_CONFIG_HOME/astroid
directory (or $HOME/.config/astroid
if it is not set) for storing its configuration file. This is a JSON file created by boost::property_tree. Options not set here will be set to their default values as specified in src/config.cc
.
By default astroid looks in $HOME/.mail
for the notmuch database, but you can change this in the configuration file. You can also set up default queries and accounts for sending e-mail there.
you can run:
$ astroid --new-config
to create a new configuration file in the default location, you can also specify a location of the new config file with the -c
argument.
astroid reads your notmuch configuration file to find the notmuch database, you can specify a non-standard notmuch configuration file with the astroid.notmuch_config
setting.
Some self-explanatory variables that you probably want to configure are (where exampleaccount
is an arbitrary identifier for your email account):
"accounts": {
"exampleaccount": {
"name": "Jane Doe",
"email": "[email protected]",
"gpgkey": "0x000000000",
"save_sent_to": "/home/jane/Mail/sent/cur/",
"save_drafts_to": "/home/jane/Mail/drafts/",
etc
}
},
you can copy this and use an unique identifier (exampleaccount
) to add several accounts. Use the example generated using astroid --new-config
as the most up-to-date template.
Check the configuration reference for a full list of options with their documentation.
At last, you need to define which program to call to send your email. For instance:
- if you use msmtp:
"accounts.id.sendmail": "msmtp --read-envelope-from -i -t"
- if you use a sendmail compatible solution (e.g. postfix), the line should be:
"sendmail": "sendmail -i -t"
For sendmail: the
-i
flag is very important.
Make sure that you configure your sendmail program to remove BCC headers.
Next Step: Polling your email