summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/mta_session.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2014-03-02 21:19:37 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2014-03-02 21:19:37 +0000
commit6dbc8c384c07b726b8091fef522520889494d840 (patch)
treee04b45a1c9561c9993e491c708491c010039c4ec /usr.sbin/smtpd/mta_session.c
parent347c39a41466f3ca418604aeddcd15d2527d4e90 (diff)
if peer advertises DSN and we don't want to use it, make sure we don't send
trailing spaces, not every MTA can cope with that ok eric@
Diffstat (limited to 'usr.sbin/smtpd/mta_session.c')
-rw-r--r--usr.sbin/smtpd/mta_session.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c
index 266ddca292f..60cef17c941 100644
--- a/usr.sbin/smtpd/mta_session.c
+++ b/usr.sbin/smtpd/mta_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta_session.c,v 1.56 2014/02/25 15:58:45 gilles Exp $ */
+/* $OpenBSD: mta_session.c,v 1.57 2014/03/02 21:19:36 gilles Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -771,11 +771,11 @@ mta_enter_state(struct mta_session *s, int newstate)
s->msgtried++;
envid_sz = strlen(e->dsn_envid);
if (s->ext & MTA_EXT_DSN) {
- mta_send(s, "MAIL FROM:<%s> %s%s %s%s",
+ mta_send(s, "MAIL FROM:<%s>%s%s%s%s",
s->task->sender,
- e->dsn_ret ? "RET=" : "",
+ e->dsn_ret ? " RET=" : "",
e->dsn_ret ? dsn_strret(e->dsn_ret) : "",
- envid_sz ? "ENVID=" : "",
+ envid_sz ? " ENVID=" : "",
envid_sz ? e->dsn_envid : "");
} else
mta_send(s, "MAIL FROM:<%s>", s->task->sender);
@@ -787,11 +787,11 @@ mta_enter_state(struct mta_session *s, int newstate)
e = s->currevp;
if (s->ext & MTA_EXT_DSN) {
- mta_send(s, "RCPT TO:<%s> %s%s %s%s",
+ mta_send(s, "RCPT TO:<%s>%s%s%s%s",
e->dest,
- e->dsn_notify ? "NOTIFY=" : "",
+ e->dsn_notify ? " NOTIFY=" : "",
e->dsn_notify ? dsn_strnotify(e->dsn_notify) : "",
- e->dsn_orcpt ? "ORCPT=" : "",
+ e->dsn_orcpt ? " ORCPT=" : "",
e->dsn_orcpt ? e->dsn_orcpt : "");
} else
mta_send(s, "RCPT TO:<%s>", e->dest);