From 62cf2d180ed77bb977acf5d8b348d4431256638f Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Mon, 12 Feb 2018 16:43:15 +0100 Subject: smtp: fix processing of initial dot in data RFC 5321 4.1.1.4 specifies the CRLF terminating the DATA command should be taken into account when chasing the . end marker. Thus a leading dot character in data is also subject to escaping. Tests 911 and test server are adapted to this situation. New tests 951 and 952 check proper handling of initial dot in data. Closes #2304 --- tests/data/test951 | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 tests/data/test951 (limited to 'tests/data/test951') diff --git a/tests/data/test951 b/tests/data/test951 new file mode 100644 index 000000000..7d2e17b1b --- /dev/null +++ b/tests/data/test951 @@ -0,0 +1,45 @@ + + + +SMTP + + + +# +# Server-side + + + +# +# Client-side + + +smtp + + +SMTP data with dot as first character + + +.This first line starts with a dot + + +smtp://%HOSTIP:%SMTPPORT/951 --mail-rcpt recipient@example.com --mail-from sender@example.com -T - + + + +# +# Verify data after the test has been "shot" + + +EHLO 951 +MAIL FROM: +RCPT TO: +DATA +QUIT + + +..This first line starts with a dot +. + + + -- cgit v1.2.3