postal icon indicating copy to clipboard operation
postal copied to clipboard

EHLO/HELO multiple MAIL FROM

Open phelset opened this issue 9 years ago • 3 comments

Postal forces EHLO/HELO before every MAIL FROM when sending multiple mails in the same connection. From what I can gather this breaks SMTP RFC; is this by design or a bug?

Althogh eg. Postfix handles this well, other legacy SMTP clients fail. Example logs:

[smtp.1:145737] [2017-05-15T10:25:12.762] DEBUG -- : [D9WT5N]    Connection opened from ::ffff:XX.XX.XX.XX
[smtp.1:145737] [2017-05-15T10:25:12.762] DEBUG -- : [D9WT5N]    Client identified as ::ffff:XX.XX.XX.XX
[smtp.1:145737] [2017-05-15T10:25:12.820] DEBUG -- : [D9WT5N] <= EHLO app.example.com
[smtp.1:145737] [2017-05-15T10:25:12.822] DEBUG -- : [D9WT5N] => 250-My capabilities are
[smtp.1:145737] [2017-05-15T10:25:12.822] DEBUG -- : [D9WT5N] => 250 AUTH CRAM-MD5 PLAIN LOGIN
[smtp.1:145737] [2017-05-15T10:25:12.883] DEBUG -- : [D9WT5N] <= AUTH CRAM-MD5
[smtp.1:145737] [2017-05-15T10:25:12.883] DEBUG -- : [D9WT5N] => 334 ---
[smtp.1:145737] [2017-05-15T10:25:12.885] DEBUG -- : [D9WT5N] <= ---
[smtp.1:145737] [2017-05-15T10:25:12.896] DEBUG -- : [D9WT5N] => 235 Granted for XXX
[smtp.1:145737] [2017-05-15T10:25:12.898] DEBUG -- : [D9WT5N] <= MAIL FROM:<[email protected]> AUTH=<>
[smtp.1:145737] [2017-05-15T10:25:12.898] DEBUG -- : [D9WT5N] => 250 OK
[smtp.1:145737] [2017-05-15T10:25:12.900] DEBUG -- : [D9WT5N] <= RCPT TO:<[email protected]>
[smtp.1:145737] [2017-05-15T10:25:12.900] DEBUG -- : [D9WT5N] Added external address '[email protected]'
[smtp.1:145737] [2017-05-15T10:25:12.900] DEBUG -- : [D9WT5N] => 250 OK
[smtp.1:145737] [2017-05-15T10:25:12.902] DEBUG -- : [D9WT5N] <= DATA
[smtp.1:145737] [2017-05-15T10:25:12.902] DEBUG -- : [D9WT5N] => 354 Go ahead
[smtp.1:145737] [2017-05-15T10:25:12.903] DEBUG -- : [D9WT5N] <= Received: from app.example.com ([XX.XX.XX.XX]) by app.example.com with ESMTP ; Mon, 15 May 2017 07:00:09 +0200
[smtp.1:145737] [2017-05-15T10:25:12.904] DEBUG -- : [D9WT5N] Not logging further message data.
[smtp.1:145737] [2017-05-15T10:25:13.002] DEBUG -- : [D9WT5N] => 250 OK
[smtp.1:145737] [2017-05-15T10:25:13.010] DEBUG -- : [D9WT5N] <= MAIL FROM:<[email protected]> AUTH=<>
[smtp.1:145737] [2017-05-15T10:25:13.010] DEBUG -- : [D9WT5N] => 503 EHLO/HELO first please
[smtp.1:145737] [2017-05-15T10:25:13.022] DEBUG -- : [D9WT5N]    Connection closed

phelset avatar May 15 '17 09:05 phelset

I think this is related to #137

adamcooke avatar May 15 '17 09:05 adamcooke

Agree

phelset avatar May 15 '17 09:05 phelset

This should now be fixed. Slightly different issue than #137 but an easy fix to set the SMTP server into the correct state after an email is sent successfully. Most clients manually send an "RSET" between messages, but this should not be necessary.

catphish avatar May 17 '17 21:05 catphish