Project Fuck Google - Email

In recent times, I have decided that google is more evil than good.  This has been one of the primary drivers for building out my homelab.  I need enough horsepower to self host everything.

One of the big ones, super big ones, obnoxiously big ones, is email.

I hate configuring email so much.  It is truly the worst.

In the olden days, I just ran local email, to an mbox dir, and ran XFMail, and later claws-mail until it had so many bugs I couldn't run it anymore.  Eventually, I built a super simple dovecot imap instance on a NetBSD box. (143).

This solved my mail client internally, because now I can run Rainloop (so good!)  However, the modern problem is a cellphone.

So how do we solve that?  We have to stand up an imaps (993) server, and a submission server.  So my mail stack is:

  1. Proxmox Mail Gateway
    1. This solves like 90% of my spam issues, without me having to constantly feed it like I did with spamassassin.
  2. Dovecot running imaps
  3. Dovecot running submission-login
  4. Postfix

I could have probably done more of this with the mail gateway, but my real interest is to just treat that thing like an FRU and not ever muck with it.  I hate dealing with spam engines, and it just does what it does in the corner and I don't have to think about it.

Now normally on some blogs, this is where the author tells you how he setup postfix and dovecot.  Nope.  I spent easily 10 hours on this, just randomly poking at things.   All the online guides explain how to setup SASL with postgres as a backend, and super complex interconnections. I didn't want or need any of this.  I have literally 2 users.  I don't need a postgres backend to deal with a map file that is 3 lines.

I just bashed on it.  Alot.  A few hints:

  • in postfix, keep your "mydestination" simple.  Don't get crazy with it, or it will loop on itself.
  • Set smtp_tls_security_level = may in postfix/main.cf so your sent email is encrypted when possible.
  • I have a Samsung phone, so I'm using the Samsung mail client.  It works pretty well, but in dovecot, for submission, you need to set "submission_client_workarounds = whitespace-before-path" in /etc/dovecot/conf.d/20-submission.conf.  If you don't do this, it will connect to your internal relay, send EHLO followed by QUIT, and you will have no idea why.

However, after a many hours of fiddling, I can now send email from my phone.  A few tweaks to the firewall later, and I can also send email from my phone, over the internet while not connected to wifi.

Thus breaking me of my google dependence on email.  Step 1.  done.

Posted on