nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 8e2f1b03fdd61685d2c0f09e9392542c558a8bff
parent 7fbaaa3d09293232ad0d88ce89fdda940c2c2919
Author: Rolf Eike Beer <eike@sf-mail.de>
Date:   Tue,  7 Jul 2020 15:47:23 +0200

qmail-smtpd: allow [] to appear in received lines

A client that can't find out the hostname should send "[ip.ad.dr.ess]" as HELO
or EHLO string. But since the square brackets were considered unsafe qmail-smtpd
mangled them to ? in the Received line actually written to the mail.

Diffstat:
Mreceived.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/received.c b/received.c @@ -18,6 +18,8 @@ static int issafe(ch) char ch; if ((ch >= 'a') && (ch <= 'z')) return 1; if ((ch >= 'A') && (ch <= 'Z')) return 1; if ((ch >= '0') && (ch <= '9')) return 1; + if (ch == '[') return 1; + if (ch == ']') return 1; return 0; }