LMTP is a variant of SMTP for the final step: handing a message from the MTA to the program that places it in mailboxes, for example from Postfix to Dovecot. The MTA handles queuing and retries; the receiving side only reports what happened for each recipient.
How it differs from SMTP
The commands are the same, with two differences. Instead of EHLO, the client says LHLO, so an SMTP client cannot be connected to an LMTP server by mistake. And after the end of the data, the server replies separately for each recipient accepted with RCPT TO.
| Feature | SMTP | LMTP |
|---|---|---|
| greeting | EHLO | LHLO |
| reply after the data | one for the whole message | one per recipient |
| queue on the receiving side | required | not required |
| where it runs | between servers over the network | inside a server, usually over a socket |
This matters when a message has several recipients: one mailbox accepts it, another is full. SMTP could give only one reply, and the receiving side would have to keep its own queue. With LMTP, the first recipient gets 250 and the second a temporary 4xx rejection, and the MTA retries delivery to the second only.
Postfix and Dovecot
Dovecot listens for LMTP on a socket inside Postfix’s queue directory, and Postfix passes it messages for virtual mailboxes.
virtual_transport = lmtp:unix:private/dovecot-lmtpThe protocol is described in RFC 2033 (1996, by J. Myers), an informational document.
Sources
the term is written from these pagesVerified 9 Nov