Ensure locally-delivered mails have the X-Original-To header

See #223
This commit is contained in:
Steve Purcell 2021-08-11 09:18:24 +00:00
parent 72748d7b6d
commit fb85a3fe9e

View File

@ -172,6 +172,8 @@ in
virtual_mailbox_domains = vhosts_file; virtual_mailbox_domains = vhosts_file;
virtual_mailbox_maps = mappedFile "valias"; virtual_mailbox_maps = mappedFile "valias";
virtual_transport = "lmtp:unix:/run/dovecot2/dovecot-lmtp"; virtual_transport = "lmtp:unix:/run/dovecot2/dovecot-lmtp";
# Avoid leakage of X-Original-To, X-Delivered-To headers between recipients
lmtp_destination_recipient_limit = "1";
# sasl with dovecot # sasl with dovecot
smtpd_sasl_type = "dovecot"; smtpd_sasl_type = "dovecot";
@ -241,6 +243,11 @@ in
submissionsOptions = submissionOptions; submissionsOptions = submissionOptions;
masterConfig = { masterConfig = {
"lmtp" = {
# Add headers when delivering, see http://www.postfix.org/smtp.8.html
# D => Delivered-To, O => X-Original-To, R => Return-Path
args = [ "flags=O" ];
};
"policy-spf" = { "policy-spf" = {
type = "unix"; type = "unix";
privileged = true; privileged = true;