From 8ecbed49cf1ce9932665991fed86e31febbb3d30 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Sun, 4 May 2014 11:08:46 +0200 Subject: [PATCH] Documenation update (LMTP). --- doc/integration/imap_and_smtp.rst | 54 +++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/doc/integration/imap_and_smtp.rst b/doc/integration/imap_and_smtp.rst index b0f0df61c..c8a0d9800 100644 --- a/doc/integration/imap_and_smtp.rst +++ b/doc/integration/imap_and_smtp.rst @@ -197,13 +197,48 @@ SQLite users Replace values between ``<>`` with yours. -LDA -=== +LMTP +==== -The LDA is activated by default but you must define a *postmaster* -address. Open the :file:`conf.d/15-lda.conf` file modify the following line:: +`Local Mail Transport Protocol +`_ is used +to let Postfix deliver messages to Dovecot. - postmaster_address = postmaster@ +First, make sure the protocol is activated by looking at the +``protocols`` setting (generally inside +:file:`dovecot.conf`). It should be similar to the following example:: + + protocols = imap pop3 lmtp + +Then, open the :file:`conf.d/10-master.conf`, look for ``lmtp`` +service definition and add the following content inside:: + + service lmtp { + # stuff before + unix_listener /var/spool/postfix/private/dovecot-lmtp { + mode = 0600 + user = postfix + group = postfix + } + # stuff after + } + +We assume here that Postfix is *chrooted* within +:file:`/var/spool/postfix`. + +Finally, open the :file:`conf.d/20-lmtp.conf` and modify it as follows:: + + protocol lmtp { + postmaster_address = postmaster@ + mail_plugins = $mail_plugins quota sieve + } + +Replace ```` by the appropriate value. + +.. note:: + + If you don't plan to apply quota or to use filters, just adapt the + content of the ``mail_plugins`` setting. .. _dovecot_quota: @@ -454,8 +489,7 @@ Use the following configuration in the :file:`/etc/postfix/main.cf` file (this is just one possible configuration):: # Stuff before - virtual_transport = dovecot - dovecot_destination_recipient_limit = 1 + virtual_transport = lmtp:unix:private/dovecot-lmtp relay_domains = virtual_mailbox_domains = :/etc/postfix/sql-domains.cf @@ -474,10 +508,4 @@ Use the following configuration in the :file:`/etc/postfix/main.cf` file Replace ```` by the name of the database you use. -Then, edit the :file:`/etc/postfix/master.cf` file and add the following -definition at the end:: - - dovecot unix - n n - - pipe - flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} - Restart Postfix.