Skip to content
/ davemail Public

My email configuration, using mbsync, notmuch, msmtp, msmtpq, pgp, emacs and gnus-alias

Notifications You must be signed in to change notification settings

kzar/davemail

Repository files navigation

Davemail

Introduction

My email setup, now under source control as it is getting rather complex!

  1. My personal emails come into my FastMail account.
  2. 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).
  3. 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 the INBOX folder, and a message with no relevant tags should be moved to the Archive folder.
  4. Those scripts also run my pre and post synchronisation hooks in Emacs, which I then use to update my modeline display etc.
  5. Notmuch Emacs client is then used for reading and tagging message. Gnus alias for handling my different email identities + signatures.
  6. Outgoing emails are sent using msmtp, back out via FastMail's servers.
  7. vdirsyncer synchronises my personal contacts and calendars with FastMail so that I have a local copy to use for address completion etc.

Usage

(Not actually supposed to be used by other people...)

  1. Install Emacs, Notmuch, msmtp, isync, gpg, libsecret-tools, vdirsyncer etc.
  2. Install Python and configobj.
  3. Set up my Emacs config.
  4. Store email server passwords e.g. secret-tool store --label="Email: kzar@kzar.co.uk" email kzar@kzar.co.uk
  5. 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.

TODO

  • 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.

About

My email configuration, using mbsync, notmuch, msmtp, msmtpq, pgp, emacs and gnus-alias

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published