summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2015-05-13 07:34:50 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2015-05-13 07:34:50 +0000
commitd2edc0c11612eadd62c3e61a16175fba8d5d7f5b (patch)
tree3ac9c9f680bb960ef51fd676072d759bdf661113 /usr.sbin/smtpd
parent08ee5eec663d061acfcec28241f3bd7378f0aa8f (diff)
The enqueuer should never encouter the "From " separator in its headers, as
it is added by the mda. If it sees one, it means that the enqueuer was used as the mda and it needs to strip it otherwise the message will end with two delimiters later down the road. Same applies to "Return-Path". bug experienced by James Turner, confirmed by Giovanni. fix suggested by Todd Miller, diff ok eric@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/enqueue.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/enqueue.c b/usr.sbin/smtpd/enqueue.c
index 761af40be98..c7dd6c9224e 100644
--- a/usr.sbin/smtpd/enqueue.c
+++ b/usr.sbin/smtpd/enqueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: enqueue.c,v 1.93 2015/05/03 18:10:58 gilles Exp $ */
+/* $OpenBSD: enqueue.c,v 1.94 2015/05/13 07:34:49 gilles Exp $ */
/*
* Copyright (c) 2005 Henning Brauer <henning@bulabula.org>
@@ -388,6 +388,13 @@ enqueue(int argc, char *argv[])
line = buf;
+ if (inheaders) {
+ if (strncasecmp("from ", line, 5) == 0)
+ continue;
+ if (strncasecmp("return-path: ", line, 13) == 0)
+ continue;
+ }
+
if (msg.saw_content_transfer_encoding || msg.noheader ||
inheaders || !msg.need_linesplit) {
send_line(fout, 0, "%.*s", (int)len, line);