My email setup, now under source control as it is getting rather complex!
- My personal emails come into my FastMail account.
- mbsync is used to keep a local copy of my emails synchronised using IMAP. (Much more efficient and reliably than offlineimap once set up correctly. Unfortunately setting it up correctly wasn't trivial).
- My pre and post synchronisation scripts are run which take care of
the tag to folder mapping as specified in .davemailrc. For example,
a message with the tag
inbox
should be moved to theINBOX
folder, and a message with no relevant tags should be moved to theArchive
folder. - Those scripts also run my pre and post synchronisation hooks in Emacs, which I then use to update my modeline display etc.
- Notmuch Emacs client is then used for reading and tagging message. Gnus alias for handling my different email identities + signatures.
- Outgoing emails are sent using msmtp, back out via FastMail's servers.
- vdirsyncer synchronises my personal contacts and calendars with FastMail so that I have a local copy to use for address completion etc.
(Not actually supposed to be used by other people...)
- Install Emacs, Notmuch, msmtp, isync, gpg, libsecret-tools, vdirsyncer etc.
- Install Python and configobj.
- Set up my Emacs config.
- Store email server passwords e.g.
secret-tool store --label="Email: [email protected]" email [email protected]
- Set up symlinks for the configuration files:
ln -s ~/path/to/davemail/.mbsyncrc ~/
ln -s ~/path/to/davemail/.msmtprc ~/
ln -s ~/path/to/davemail/.notmuch-config ~/
ln -s ~/path/to/davemail/.vdirsyncerrc ~/.config/vdirsyncer/config
- Run
./syncmail
to do a complete mail synchronisation every two minutes. - Press Enter to have the script synchronise again immediately.
- Run
vdirsyncer sync
to synchronise personal contacts and calendar with Fastmail.
maintain_tag_folder_mapping
does not behave well when enabled for multiple accounts if an email is forwarded between the accounts. It is moved to the first account's Maildir, even if the mail should exist in both Maildirs. That, in turn, screws up the tags.- Figure out how to consider the address the original email was to when forwarding emails. Currently, the wrong alias is often used.
- Set up imapnotify to trigger mbsync, rather than polling.
- Sending emails using msmtp blocks Emacs, which sucks when the connection to Fastmail is slow.
- Finish the old message archiving functionality?
- Perhaps replace some of davemail.py with imapfilter?
- Have notmuch use my local copy of my contacts for address completion as
well as the notmuch database. (See
notmuch-address-command
.) - Use syncmaildir instead of IMAP?
- Replace msmtp with nullmailer?
- Figure out how to get Outlook SSO working for my work emails.