Local Mail Transfer Protocol


The Local Mail Transfer Protocol is a derivative of ESMTP, the extension of the Simple Mail Transfer Protocol. It is defined in RFC 2033. LMTP is designed as an alternative to normal SMTP for situations where the receiving side does not have a mail queue, such as a mail storage server acting as a Mail Delivery Agent.

Overview

Mail queues are an inherent requisite of SMTP. In situations in which mail queues are not possible, LMTP is desirable, since a mail storage server should manage only its mail store without having to allocate more storage for a mail queue. This is not possible with SMTP when there are multiple recipients for a mail message. SMTP can only indicate successful delivery or failure for all or none of the recipients, creating the need for a separate queue to handle the failed recipients.
LMTP, on the other hand, can indicate success or failure to the client for each recipient, allowing the client to handle the queueing instead. The client in this case would typically be an Internet-facing mail gateway. LMTP is not intended for use over wide area networks. In other words, the message transfer agent still handles all outgoing mail, including the mail stream from the LMTP, to another mail server located somewhere on the Internet.
LMTP is an Application Layer protocol of the Internet Protocol Suite. It can use a Transmission Control Protocol transport like SMTP, but must not use port number 25, the well-known port for SMTP. Usage of port 24 is common among some mail server applications however.

Differences from ESMTP

LMTP conversation syntax is based on the same commands as Extended SMTP with the following exceptions:
The key difference is that LMTP will reject a message for a specific final recipient if it is not immediately deliverable. This removes the need for a mail queue. For this reason, LMTP is not run on the standard TCP port of SMTP.