diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2012-01-30 20:21:54 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2012-01-30 20:21:54 +0000 |
commit | b1ed28624997bbf7e8e5f07fa7b8afb88688def6 (patch) | |
tree | 3ca8a7b21482690c516a459f25675a68a48f6049 /usr.sbin | |
parent | 1c116cea71f71e49cf31f0bf36788f33d51d033e (diff) |
do not encode headers, it breaks the resulting message
reported by eric@ and miod@
ok chl@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/enqueue.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/enqueue.c b/usr.sbin/smtpd/enqueue.c index 6753be44d6b..54da5a2888f 100644 --- a/usr.sbin/smtpd/enqueue.c +++ b/usr.sbin/smtpd/enqueue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: enqueue.c,v 1.53 2012/01/29 10:42:23 eric Exp $ */ +/* $OpenBSD: enqueue.c,v 1.54 2012/01/30 20:21:53 gilles Exp $ */ /* * Copyright (c) 2005 Henning Brauer <henning@bulabula.org> @@ -166,6 +166,7 @@ enqueue(int argc, char *argv[]) size_t len; char *line; int dotted; + int inheaders = 0; bzero(&msg, sizeof(msg)); time(×tamp); @@ -293,11 +294,13 @@ enqueue(int argc, char *argv[]) if (!msg.saw_content_transfer_encoding) fprintf(fout, "Content-Transfer-Encoding: quoted-printable\n"); if (!msg.saw_user_agent) - fprintf(fout, "User-Agent: OpenSMTPD enqueuer\n"); + fprintf(fout, "User-Agent: OpenSMTPD enqueuer (Demoosh)\n"); /* add separating newline */ if (noheader) fprintf(fout, "\n"); + else + inheaders = 1; for (;;) { buf = fgetln(fp, &len); @@ -317,8 +320,10 @@ enqueue(int argc, char *argv[]) line = buf; - if (msg.saw_content_transfer_encoding) { + if (msg.saw_content_transfer_encoding || noheader || inheaders) { fprintf(fout, "%.*s", (int)len, line); + if (inheaders && buf[0] == '\n') + inheaders = 0; continue; } |