msztolcman / sendria

Sendria (formerly MailTrap) is a SMTP server designed to run in your dev/test environment, that is designed to catch any email you or your application is sending, and display it in a web interface instead of sending to real world.
MIT License
149 stars 14 forks source link

Use native aiosmtpd auth mechanism #4

Closed Arzaroth closed 3 years ago

Arzaroth commented 3 years ago

The aiosmtpd library features builtin SMTP AUTH in the 1.2.2 version.

In my opinion, it does the job a bit better than the current implementation. For example, it handles a "two phases" authentication by emitting a 334 code,which is mainly used for providing a challenge, but some SMTP clients behave this way for AUTH PLAIN too.

It also circumvent the need to overload the EHLO message (which was incorrectly sending a LF instead of a CRLF for the AUTH capability).

Some logging was lost in the process though (it could be added back in all fairness).

msztolcman commented 3 years ago

Hi @Arzaroth,

It's great aiosmtpd now supports auth! Thanks, I didn't noticed it :) I will try to review this PR today.

Thanks!

msztolcman commented 3 years ago

It's merged, thanks @Arzaroth!