/davemail

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

Primary LanguagePython

Davemail

Introduction

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

  1. My emails come in to 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 keeping enforcing 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 and the msmtpq script, back out via FastMail's servers.

Usage

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

  1. Install Emacs, Notmuch, msmtp, msmtpq, isync, gpg etc.
  2. Set up my Emacs config.
  3. Create password.gpg with the FastMail password.
  • Run ./syncmail to do a complete mail synchronisation every two minutes.
  • Run ./syncmail 1 to fetch incoming emails every 30 seconds.
  • Press Enter to have the script synchronise again immediately.

TODO

  • Figure out how to consider the address the original email was to when forwarding emails. Currently the wrong alias is often used.
  • Figure out algorithm to fix broken line wrapping in Rietveld emails.
  • Figure out why forwarded messages sometimes get mangled.
  • Ditch webmail / mobile email completely?!
  • Set up imapnotify to trigger mbsync, rather than polling.
  • If sending fails and the mail is later sent from the msmtp queue the Fcc copy to the Sent folder is not written.
  • Sending emails using msmtp blocks Emacs, which sucks when the connection to Fastmail is slow.
  • Remove hard-coded paths to password.gpg somehow.