From 0dc7a74a3ffd596b58d3f7fa4ca955ecd1b468dd Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Fri, 27 Mar 2020 06:23:51 +0000 Subject: [PATCH] Set up LMTP so Postfix can deliver locally too Previously mail was just getting replicated here, but if we want this to be a viable backup MX, we should support receiving mail, which means Postfix integration. Apparently LMTP is better than LDA, so use it. --- conf.d/10-master.conf | 7 ++++++- conf.d/20-lmtp.conf | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 conf.d/20-lmtp.conf diff --git a/conf.d/10-master.conf b/conf.d/10-master.conf index 5068100..31b8e22 100644 --- a/conf.d/10-master.conf +++ b/conf.d/10-master.conf @@ -46,8 +46,13 @@ service pop3-login { } service lmtp { - unix_listener lmtp { + #unix_listener lmtp { #mode = 0666 + #} + unix_listener /var/spool/postfix/private/dovecot-lmtp { + group = postfix + mode = 0600 + user = postfix } # Create inet listener only if you can't use the above UNIX socket diff --git a/conf.d/20-lmtp.conf b/conf.d/20-lmtp.conf new file mode 100644 index 0000000..a95bea4 --- /dev/null +++ b/conf.d/20-lmtp.conf @@ -0,0 +1,32 @@ +## +## LMTP specific settings +## + +# Support proxying to other LMTP/SMTP servers by performing passdb lookups. +#lmtp_proxy = no + +# When recipient address includes the detail (e.g. user+detail), try to save +# the mail to the detail mailbox. See also recipient_delimiter and +# lda_mailbox_autocreate settings. +#lmtp_save_to_detail_mailbox = no + +# Verify quota before replying to RCPT TO. This adds a small overhead. +#lmtp_rcpt_check_quota = no + +# Which recipient address to use for Delivered-To: header and Received: +# header. The default is "final", which is the same as the one given to +# RCPT TO command. "original" uses the address given in RCPT TO's ORCPT +# parameter, "none" uses nothing. Note that "none" is currently always used +# when a mail has multiple recipients. +#lmtp_hdr_delivery_address = final + +protocol lmtp { + # Space separated list of plugins to load (default is global mail_plugins). + mail_plugins = $mail_plugins sieve + + auth_username_format = %Ln + + deliver_log_format = msgid=%m, subj=%s: %$ + log_path = /var/log/mail/dovecot-lmtp.log + info_log_path = /var/log/mail/dovecot-lmtp.info.log +} -- 2.34.1