andris9 / hoodiecrow

Scriptable IMAP server for client integration testing
http://andris9.github.io/hoodiecrow/
Other
60 stars 27 forks source link

Hoodiecrow doesn't handle SMTP period escaping. #21

Closed mike-lang closed 8 years ago

mike-lang commented 8 years ago

The RFC for the SMTP protocol calls for SMTP servers to check each line that is sent as data to the SMTP server to see if the line begins with a period and when a period is received as the first character and is not the only character received on the line, the SMTP server is expected to remove that initial period character from the line. Hoodiecrow does not currently do this and as a result, when an SMTP client submits a mail message and the submission happens to put a period at the beginning of a line of data submitted to hoodiecrow, the resulting email ends up with two periods in place of the expected one period.

While it seems like this is a bug in the simpleSMTP module underlying hoodiecrow's SMTP support, I noticed that module has been deprecated, so it seemed unwise to try to develop a fix within that module.

I've put together a patch to hoodiecrow that addresses this issue by altering how hoodiecrow makes use of the simpleSMTP module. I'll submit it in a pull request shortly as it can be used as a temporary fix until it is determined what to do regarding simpleSMTP.