aerogramme.deuxfleurs.fr/content/documentation/cookbook/smtp-server.md
2024-01-23 20:21:03 +01:00

3 KiB

+++ title = "SMTP servers" weight = 50 +++

Many email Message Transfer Agent (MTA) supports LMTP delivery. Some of them are covered here.

Postfix

Configuring Postfix requires to add these 2 lines to main.cf:

virtual_mailbox_domains = your-domain.tld
virtual_transport = lmtp:[::1]:1025

Make sure that your-domain.org is not already configured in the mydomain variable, or it might conflict with Postfix local delivery logic.

Indeed, Postfix internally has its default configuration for "local" mail delivery, that maps to the old way of managing emails. LMTP delivery is a more recent, and maps to the "virtual" mail delivery mechanisms of Postfix. Your goal is thus to deactivate as much as possible the "local" delivery capabilities of Postfix and only allow the "virtual" ones.

You can learn more about Postfix LMTP capabilities on this page: lmtp(8).

OpenSMTPD

Something like below might work (untested):

action "remote_mail" lmtp "/var/run/dovecot/lmtp" rcpt-to virtual <virtuals>
match from any for domain "your-domain.tld" action "remote_mail"

The syntax is described in their manpage smtpd.conf(5).

Other servers

Maddy might be configured to deliver LMTP messages to Aerogramme through its SMTP & LMTP transparent forwarding feature.

Exim has some support for LMTP too.

sendmail might deliver to LMTP through a dedicated binary named smtpc