This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 7 and 8
Revision 7 as of 2012-05-24 16:25:47
Size: 2435
Editor: fw2
Comment: spelling
Revision 8 as of 2012-07-27 06:11:15
Size: 2373
Editor: nv-71-53-191-101
Comment: Added a reference to process_min_avail
Deletions are marked like this. Additions are marked like this.
Line 46: Line 46:
== LMTP Proxying == == Performance ==
Line 48: Line 48:
It's possible to use Dovecot LMTP server as a proxy to remote LMTP or SMTP servers. The configuration is similar to [[PasswordDatabase/ExtraFields/Proxy|IMAP/POP3 proxying]], but you'll need to tell Dovecot LMTP to issue passdb lookups: For higher volume sites, it may be desirable to increase the number of active listener processes. A range of 5 to 20 is probably good for most sites:
Line 51: Line 51:
lmtp_proxy = yes service lmtp {
  process_min_avail = 5
}

LMTP Server

LMTP uses the same settings as LDA, as specified in conf.d/15-lda.conf in example configuration. There is also a bit of extra configuration in conf.d/20-lmtp.conf. The main difference is that the LDA is a short-running process, started as a binary from command line, while LMTP is a long-running process started by Dovecot's master process.

Envelope Addresses

Compared to dovecot-lda parameters, the addresses are taken from:

  • -f / Envelope sender address: This is the MAIL FROM: value from LMTP session.
  • -r / Final envelope recipient address: This is the RCPT TO: value from LMTP session.
  • -a / Original envelope recipient address: This defaults to same as RCPT TO: value, but may be overridden by reading it from a header specified by lda_original_recipient_header setting.

  • -d / Destination username: This is the same as RCPT TO: value, but with the "+extension" part removed when recipient_delimiter setting is set. If usernames differ from recipient email addresses, the userdb must handle the translation.

Listeners

You can configure LMTP to be listening on TCP or UNIX sockets:

# add lmtp to protocols, otherwise its listeners are ignored
protocols = imap pop3 lmtp

service lmtp {
  inet_listener lmtp {
    address = 192.168.0.24 127.0.0.1 ::1
    port = 24
  }

  unix_listener lmtp {
    #mode = 0666
  }
}

The UNIX listener on $base_dir/lmtp is enabled by default when protocols setting contains lmtp.

Security

Unfortunately LMTP process currently needs to run as root, and only temporarily drop privileges to users. Otherwise it couldn't handle mail deliveries to more than a single user with different UID. If you're using only a single global UID/GID, you can improve security by running lmtp processes as that user:

service lmtp {
  user = vmail
}

Performance

For higher volume sites, it may be desirable to increase the number of active listener processes. A range of 5 to 20 is probably good for most sites:

service lmtp {
  process_min_avail = 5
}

Plugins

None: LMTP (last edited 2019-09-11 14:29:21 by MichaelSlusarz)