Module 4 · Lesson 9 of 25

Let's Encrypt auto-renewal hook

Part of Dovecot: IMAP/POP3 at Production Scale — SSL/TLS, Certificates, and Ports.

Certbot renews certs in place but doesn't restart Dovecot. Without a reload, you keep serving the old cert until Dovecot restarts.

Add a deploy hook in /etc/letsencrypt/renewal-hooks/deploy/reload-dovecot.sh:

#!/bin/bash
systemctl reload dovecot
systemctl reload postfix
chmod +x /etc/letsencrypt/renewal-hooks/deploy/reload-dovecot.sh

Test certificate from outside:

openssl s_client -connect mail.example.com:993 -servername mail.example.com -showcerts < /dev/null | grep "Verify return code"

Want Verify return code: 0 (ok).

SNI for multiple hostnames: add per-name blocks:

local_name imap.alt.example {
  ssl_cert = </etc/letsencrypt/live/imap.alt.example/fullchain.pem
  ssl_key  = </etc/letsencrypt/live/imap.alt.example/privkey.pem
}

Sign in to keep track of what you have read.

Pulse · self-hosted sending

Own the infrastructure your pipeline depends on.

One install script on your own server. Pulse sets up the MTA, mailboxes, certificates and dashboard; you add domains and start sending.

# on a fresh Ubuntu server
$ cd pulse && sudo ./install.sh
→ docker compose up · kumomta · stalwart · caddy
→ dashboard ready on https://pulse.yourdomain.com
$

Also from us:Beat — monitoring that tells you the fixConsulting — $65/hr, no retainer