When the weather is nice I enjoy working outdoors when I can; since my current data plan on my phone is abysmal, and I prefer working on my full-sized laptop, my email setup is a bit different than normal peoples’. I don’t rely on simply connecting to a remote server because I like being able to read, sort, and reference my email while offline, so this post is a simple description of how I “do email”.
Fetching my email is easy: every 5 minutes my laptop runs the program `offlineimap’ as a cron-job to try and fetch my email from a remote IMAP server. If it fails, it’s no big deal, it will try again later. Once my email has been fetched and stored in a local Maildir, I can use any program that I want for actually reading and responding to email. For this I use Gnus, an email reader that is built into emacs.
For sending mail, I use two programs. First, I use msmtp to send emails off of my machine. Msmtp simply forwards my email to a real smtp server that does all of the heavy lifting. And since I work without a connection and would still like to reply to mail, I use a script called msmtp-enqueue.sh, which saves my outgoing emails in a queue, and a cron-job tries to empty the queue every 5 minutes.
This setup is a little bit strange, and it’s not for everyone, but it gives me the maximal amount of freedom to read and write emails without having always have a constant connection to the internet.