Setting up Postfix and Dovecot Slowly and Properly

Back in 2015 I embarked on an ambitious plan to blog my entire way through setting up my own selfhosted email server. I got a fair bit in (5 posts) before the setting up got ahead of the blogging and I lost track of scribbled notes and halfwritten posts. Moving to a fresh Ubuntu 18.04 install I decided to move as many services as possible to containers, including my email setup and so, rather than just copy paste my old config files I dug into the basics of email setup again.

With some fresh motivation I intend to plough on in the sadly inelegantly titled series “Let’s do Postfix again but slowly and properly this time” (as in the opposite of a quick an’ dirty “that’ll do” type setup) and extend it with some Dovecot posts. The general guidelines of the series are

  • A modicum of understanding of the general behind-the-scenes workings. What is the role of the MTA vs. the MDA? What does an IMAP-login actually look like in telnet? No deep dive stuff, just sufficient for our needs.
  • Always understand whatever setting we’re tinkering with. No copy-pasta.
  • Start from a primitive setup and work our way up. We need to understand what we’re doing so we eschew all the fancy stuff until we’re ready.
  • Each post end with a working setup or a full upgrade.
  • Write the kind of guide I would have liked to have found when setting up my email server.

The old posts

  1. Postfix 1: A simple local mail receiving server
  2. Postfix 2: Address manipulation
  3. Postfix 3: Opening up to the outside
  4. Postfix 4: Virtual domains
  5. Postfix 5: Relaying from the local network

Planned new posts

I will probably get distracted halfway through once again because the best laid plans of mice and men etc. For what it’s worth here’s my roadmap:

  1. Dovecot 1: Basic Dovecot
  2. Dovecot 2: Authentication with dovecot (including ssl connection and safe passdb)
  3. Postfix 6: Postfix authentication with SASL
  4. Postfix 7: Encryption
  5. Postfix 8: PTR and SPF records
  6. Dovecot 3: LMTP
  7. Dovecot 4: Filtering with Sieve
  8. Postfix 9: Rspamd
  9. Postfix 10: Restricting access
  10. Bonus episode: Postfix 11: pflogsumm

2020 note

I also really want to get round to DKIM and DMARC as they feel like the final hurdles to MTA acceptance by the big boys. (For now at least, I’m sure that Google engineers are cooking up new and interesting ways to make selfhosters lives miserable.) Nevertheless, I will save them for a later date as a) you can still have a perfectly decent experience receiving and sending email without knowing about them in 2020 and b) I’m kind of burned out on email as a topic after 14 15 long and detailed posts.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.