aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/driver.c b/driver.c
index 14ab1602..f8e02ec6 100644
--- a/driver.c
+++ b/driver.c
@@ -626,6 +626,19 @@ static int readheaders(int sock,
}
/*
+ * We remove all Delivered-To: headers.
+ *
+ * This is to avoid false mail loops messages when delivering
+ * local messages to and from a Postfix/qmail mailserver.
+ *
+ * Should be controlled by an option
+ */
+ if (ctl->dropdelivered && !strncasecmp(line, "Delivered-To:", 13)) {
+ free(line);
+ continue;
+ }
+
+ /*
* If we see a Status line, it may have been inserted by an MUA
* on the mail host, or it may have been inserted by the server
* program after the headers in the transaction stream. This