Skip to content

Latest commit

 

History

History
77 lines (67 loc) · 3.56 KB

README.md

File metadata and controls

77 lines (67 loc) · 3.56 KB

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: [email protected]" email [email protected]
  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.