Offline Email

Published 2021-10-02 on Cara's Blog - Permalink

First things first, I want to apologize for missing last month’s status update. The transition from high school and the summer break to the new rigor of college has hit me and I still need time to adjust. I’ll definitely be writing a status update for October though!

Onto the post: Recently I came upon an older post by Drew Devault about how he uses mbsync and postfix for offline email, and I was inspired to recreate it myself. My college will sometimes refuse to allow my old T430 to connect to the WiFi, leaving me unable to respond to emails until I can get back online. Plus, it seems like a really cool thing to do!

I deviated a little from Drew’s post, specifically in the software that I used. I ran into issues using postfix as my MTA, which I’ll detail further on. I also decided against using aerc as my MUA, because I’ve had consistent performance issues with it and it still sometimes crashes when I change folders. My final software list is:

  • mbsync/isync: Syncing IMAP to a Maildir on my laptop
  • neomutt: Mail Client
  • msmtp: sending email

The first thing I attempted was setting up mbsync/isync to grab new messages from my IMAP account at Migadu. This was fairly easy using Drew’s post and the Arch Wiki page as guides. My final .mbsyncrc can be found here. Then, I set it up to sync every minute with a simple crontab:

* * * * * chronic mbsync -a

Next came neomutt, which I use to read and manipulate mail. This took some finicky configuration, because I had to get it to read the right directory. Specifically, it kept adding a second / to the end of my folder, which turned out to be my fault adding a / to the end of my set spoolfile=+ line in .muttrc. You can see my final configuration file here. I had some issues where neomutt would use my linux username instead of my configured email address as part of my From header, which I fixed by adding the following line to my muttrc:

my_hdr From: Cara Salter <cara@devcara.com>

Finally, msmtp. I decided on msmtp against postfix because postfix kept erasing my From header and sending an empty sender to Migadu. Msmtp “Just Worked”, so I went with that. It’s possible I might try postfix again soon, especially since I want to learn how it works, and when I do I’ll be sure to write it up for this blog.


Articles from my webring

Open source means surrendering your monopoly over commercial exploitation

Participation in open source requires you to surrender your monopoly over commercial exploitation. This is a profound point about free and open source software which seems to be causing a lot of companies to struggle with their understanding of the philosoph…

via Drew DeVault's blog January 20, 2021

Status update, January 2021

Hi all! This month again, my main focus has been wlroots. I’ve focused on the internal renderer refactoring (the so-called “renderer v6"). A lot of the work has now been completed, and all backends now use the new interfaces under-the-hood. With the help …

via emersion January 18, 2021

mdBook security advisory

This is a cross-post of the official security advisory. The official post contains a signed version with our PGP key, as well. The Rust Security Response Working Group was recently notified of a security issue affecting the search feature of mdBook, which co…

via Rust Blog January 4, 2021

Generated by openring