60 Seconds of WIP, 3 August 2023

Today’s snippet is from Run Your Own Mail Server, discussing LMTP versus dovecot-lda(1).

Once multiple messages start arriving simultaneously it’s much more efficient to use a dedicated daemon for local delivery, via the Local Mail Transport Protocol (LMTP).

Why have a separate protocol for local email? LMTP is a heavily trimmed-down version of SMTP. LMTP doesn’t need queues; either it delivers the message to the user’s inbox and reports success, or can’t deliver and reports an error. All queuing takes place on the SMTP level. LMTP is designed for trusted environments, so it has no access controls. If you can reach the LMTP server, you can use it. If you have separate hosts for the message store and the mail exchanger, you can use LMTP between them and protect the service with packet filters, firewalls, and a Sith Lord with a six-bladed lightsaber and constipation. For a single server, though, use LMTP over a Unix socket.

If you’re interested, you can support writing this book and get your name in inside. I freely consider that many sysadmins consider running their own email server pure doom, and if you’re into doom you should look at my Kickstarter.