Go to the first, previous, next, last section, table of contents.


17. The lmtp transport

The lmtp transport runs the LMTP protocol (RFC 2033) over a pipe to a specified command. It is something of a cross between pipe and smtp. Exim also has support for using LMTP over TCP/IP; this is implemented as an option for the smtp transport. Because LMTP is expected to be of minority interest, the default built-time configure in `src/EDITME' has it commented out. You need to ensure that

TRANSPORT_LMTP=yes

is present in your Local/Makefile in order to have the lmtp transport included in the Exim binary.

The private options of the lmtp transport are as follows:

batch (lmtp)

Type: string
Default: "none"

As for other local transports, by default each address that is directed or routed to an lmtp transport is handled separately. However, the whole point of lmtp is to be able to pass a single copy of a message with more than one recipient, so batch should normally be set to something other than the default.

If it is set to the string `domain', all addresses with the same domain that are directed or routed to the transport are handled in a single delivery. If it is set to `all', multiple domains are batched. The list of addresses is included in the Envelope-to: header if envelope_to_add is set. When more than one address is being delivered, $local_part is not set, and $domain is set only if they all have the same domain.

batch_max (lmtp)

Type: integer
Default: 100

This limits the number of addresses that can be handled in a batch.

command (lmtp)

Type: string
Default: unset

This is a mandatory option, which must be set. The string is a command which is run in a separate process. It is split up into a command name and list of arguments, each of which is separately expanded (so expansion cannot change the number of arguments). The command is run directly, not via a shell. The message is passed to the new process using the standard input and output to operate the LMTP protocol.

group (lmtp)

Type: string
Default: unset

If this option is set, it specifies the group under whose gid the delivery process is to be run. If it is not set, a value associated with a user may be used (see below); otherwise a value must have been associated with the address by the director which handled it. If the string contains no $ characters, it is resolved when Exim starts up. Otherwise, the string is expanded at the time the transport is run, and must yield either a digit string or a name which can be looked up using getgrnam().

timeout (lmtp)

Type: time
Default: 5m

The transport is aborted if the created process does not respond to SMTP commands or message input within this timeout.

user (lmtp)

Type: string
Default: unset

If this option is set, it specifies the user under whose uid the delivery process is to be run. If it is not set, a value must have been associated with the address by the director that handled it. If the string contains no $ characters, it is resolved when Exim starts up. Otherwise, the string is expanded at the time the transport is run, and must yield either a digit string or a name which can be looked up using getpwnam(). When getpwnam() is used, either at start-up time or later, the group id value associated with the user is taken as the value to be used if the group option is not set. Here is an example of a typical LMTP transport:

lmtp:
  driver = lmtp
  command = /some/local/lmtp/delivery/program
  batch = all
  batch_max = 20
  user = exim

This delivers up to 20 addresses at time, in a mixture of domains if necessary, running as the user exim.


Go to the first, previous, next, last section, table of contents.