summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgilles <gilles@openbsd.org>2009-08-01 15:33:28 +0000
committergilles <gilles@openbsd.org>2009-08-01 15:33:28 +0000
commitd4ef469399b9c4a83ee94bfabb4a571decc344e1 (patch)
treed71948544a3d0af2cdddb235ea1672a3a8c50ef8
parentPass the right size of the structure "map" to the ldpd engine. (diff)
downloadwireguard-openbsd-d4ef469399b9c4a83ee94bfabb4a571decc344e1.tar.xz
wireguard-openbsd-d4ef469399b9c4a83ee94bfabb4a571decc344e1.zip
when receiving characters with the most significant bit set over a session
not flagged with F_8BITMIME, clear the bit instead of permanently erroring the whole message. some mta's do not always request 8BITMIME when they are sending messages which are not 8bit clean, this lets us be less strict for them while not violating RFC ourselves. ok jacekm@
-rw-r--r--usr.sbin/smtpd/smtp_session.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c
index 5e9bc692840..f6524f197ee 100644
--- a/usr.sbin/smtpd/smtp_session.c
+++ b/usr.sbin/smtpd/smtp_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtp_session.c,v 1.108 2009/07/19 19:06:02 jacekm Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.109 2009/08/01 15:33:28 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -850,11 +850,7 @@ session_read_data(struct session *s, char *line, size_t nread)
if (! (s->s_flags & F_8BITMIME)) {
for (i = 0; i < len; ++i)
if (line[i] & 0x80)
- break;
- if (i != len) {
- s->s_msg.status |= S_MESSAGE_PERMFAILURE;
- return;
- }
+ line[i] = line[i] & 0x7f;
}
}