The Local Mail Transfer Protocol (LMTP) is an alternative to (Extended)
Simple Mail Transfer Protocol
The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients typica ...
for situations where the receiving side does not have a mail queue, such as a
message transfer agent
Within the Internet email system, a message transfer agent (MTA), or mail transfer agent, or mail relay is software that transfers electronic mail messages from one computer to another using SMTP. The terms mail server, mail exchanger, and MX host ...
acting as a
message delivery agent A message delivery agent (MDA), or mail delivery agent, is a computer software component that is responsible for the delivery of e-mail messages to a local recipient's mailbox., ''Internet Mail Architecture'', D. Crocker (July 2009) It is also call ...
. LMTP was described in in 1996.
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 network
A wide area network (WAN) is a telecommunications network that extends over a large geographic area. Wide area networks are often established with leased telecommunication circuits.
Businesses, as well as schools and government entities, u ...
s. In other words, the
message transfer agent
Within the Internet email system, a message transfer agent (MTA), or mail transfer agent, or mail relay is software that transfers electronic mail messages from one computer to another using SMTP. The terms mail server, mail exchanger, and MX host ...
(MTA) 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
The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the sui ...
. It can use a
Transmission Control Protocol
The Transmission Control Protocol (TCP) is one of the main protocols of the Internet protocol suite. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, the entire suite is common ...
(TCP) transport like SMTP, but must not use
port number
In computer networking, a port is a number assigned to uniquely identify a connection endpoint and to direct data to a specific service. At the software level, within an operating system, a port is a logical construct that identifies a specific ...
25, the
well-known port
This is a list of TCP and UDP port numbers used by protocols for operation of network applications.
The Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) only need one port for duplex, bidirectional traffic. They usually u ...
for SMTP. Usage of port 24 ("any private mail system") is common among some mail server applications however.
Differences from SMTP
LMTP conversation syntax is based on the same commands as SMTP (formerly called Extended SMTP) with the following exceptions:
* LMTP must not be used on port 25, reserved for SMTP
*LMTP uses
LHLO
verb instead of
EHLO
or
HELO
used in SMTP
* ESMTP requires a single status for the entire message body. LMTP requires a response for each previously successful RCPT command. That is, in case of multiple recipients, after the body of the message has been transmitted, LMTP can still fail for some recipient while succeeding for the others. With this facility, LMTP can fail if a user is over quota without the burden of generating
bounce message
A bounce message or just "bounce" is an automated message from an email system, informing the sender of a previous message that the message has not been delivered (or some other delivery problem occurred). The original message is said to have "bou ...
s.
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.
References
{{Email clients
Internet mail protocols