postal icon indicating copy to clipboard operation
postal copied to clipboard

AUTH LOGIN not RFC compliant

Open phelset opened this issue 9 years ago • 5 comments

Hi AUTH LOGIN <base64-encoded-username> does not work:

Connected to postal.example.com.
Escape character is '^]'.
220 postal.example.com ESMTP Postal/EXUM3K
EHLO example.com
250-My capabilities are
250 AUTH CRAM-MD5 PLAIN LOGIN
AUTH LOGIN SomeBase64<CR>
<CR>
502 Invalid/unsupported command
QUIT
221 Closing Connection
Connection closed by foreign host.

If no carriage return (<CR>) is given after AUTH LOGIN the connection stalls and the client/server times the connection out. Seems like this method needs adjustments: https://github.com/atech/postal/blob/master/lib/postal/smtp_server/client.rb#L172

Using AUTH LOGIN, then username, then password works:

Connected to postal.example.com.
Escape character is '^]'.
220 postal.example.com ESMTP Postal/R1GFEN
EHLO example.com
250-My capabilities are
250 AUTH CRAM-MD5 PLAIN LOGIN
AUTH LOGIN
334 VXNlcm5hbWU6
RXhhbXBsZVVzZXJuYW1l
334 UGFzc3dvcmQ6
RXhhbXBsZVBhc3N3b3Jk
235 Granted for example/test
QUIT
221 Closing Connection
Connection closed by foreign host.

phelset avatar Jul 03 '17 07:07 phelset

Thank you for the detailed report. We will look to get this fixed.

catphish avatar Jul 03 '17 09:07 catphish

Same issue!

Most of the .NET application are not working with Postal as they send:

AUTH LOGIN <base64-encoded-username> which does not work.

webhostinggeek avatar Jul 11 '17 06:07 webhostinggeek

Fixed in f1bee5644b87261a0d876ec9a663447338c75afd

catphish avatar Jul 11 '17 08:07 catphish

Awesome! 👍 Tested with few .NET scripts and working with these changes!

webhostinggeek avatar Jul 11 '17 09:07 webhostinggeek

Awesome, thanks for testing!

catphish avatar Jul 11 '17 09:07 catphish