Local Mail Transfer Protocol

from Wikipedia, the free encyclopedia

The Local Mail Transfer Protocol ( LMTP ) is a derivative of SMTP - protocol .

While SMTP was developed for worldwide mail delivery between any mail transfer agents , LMTP is for the delivery of mails within a local organization, i.e. H. intended for transport between different local server components such as Mail Transfer Agent and Mail Delivery Agent . In contrast, the delivery to the individual user mailboxes is carried out by the Mail Delivery Agent.

The differences to SMTP

  • In contrast to SMTP, LMTP is designed in such a way that it can be used to communicate securely with servers that do not have their own queue . If delivery cannot take place directly, the server temporarily rejects the mail. The transmission via LMTP only takes place if the mail can be completely delivered immediately.
  • In order to avoid that an SMTP-only client communicates with an LMTP-only server, LHLO is used instead of the SMTP-typical HELO or EHLO handshake.
  • If there was no successful RCPT command in the current session, the server must return error code 503 as a response to DATA.
  • After the final "." of the DATA command, the server must send a status message for each accepted RCPT command. The order of the client must be observed.

Example from the client's point of view

For better understanding, the following example has been expanded with comments that are not part of the protocol. These start with # and extend to the end of the line.

< 220 server.tld LMTP server ready
> LHLO client.tld                                       # LHLO Handshake statt HELO/EHLO
< 250-server.tld
< 250-PIPELINING
< 250 SIZE
> MAIL FROM:<user@example.tld>
< 250 OK
> RCPT TO:<wiki@wikipedia.org>                          # 1. erfolgreiches RCPT
< 250 OK
> RCPT TO:<sales@wikipedia.org>                         # nicht erfolgreiches RCPT
< 550 No such user here
> RCPT TO:<admin@wikipedia.org>                         # 2. erfolgreiches RCPT
< 250 OK
> DATA
< 354 Start mail input; end with <CRLF>.<CRLF>
> Client sends message
> .
                                                        # SMTP erlaubt hier nur eine Antwort, LMTP dagegen eine Antwort
                                                        # pro erfolgreichem RCPT in entsprechender Reihenfolge.
< 250 <wiki@wikipedia.org> OK                           # Zustellung an wiki@wikipedia.org erfolgreich
< 452 <admin@wikipedia.org> is temporarily over quota   # Zustellung an admin@wikipedia.org temporär nicht möglich
                                                        # der Client wird es also später erneut versuchen
> QUIT
< 221 server.tld closing connection

software

LMTP is supported in several software packages, including

Web links