Useful Dev Resources
Missing Final Acknowledgement
The current SMTPd implementation is missing the final response after the DATA command which is causing all of the client MTAs to reattempt sending their emails. See below for and example of the current response from the SMTPd.
$ telnet mail3.newsletter.nerds.io smtp Trying 126.96.36.199... Connected to mail3.newsletter.nerds.io. Escape character is '^]'. 220 ip-172-31-20-7.ec2.internal Python SMTP proxy version 0.2 HELO outbound.projectnewsletter.org 250 ip-172-31-20-7.ec2.internal MAIL FROM: email@example.com 250 Ok RCPT TO: firstname.lastname@example.org 250 Ok DATA 354 End data with <CR><LF>.<CR><LF> This is some data . Connection closed by foreign host.
The server should reply with a status code as illustrated on pages 19 and 53 of the RFC. Either a 2xy or 5xy similar to below:
250 2.6.0 <1zEog0285S@mail3.newsletter.nerds.io.
Example from an MTA log, the socket closing is interpreted as a failure (as it should be):
Nov 20 00:45:23 outbound postfix/smtp: 741AB42538: to=<email@example.com>, relay=mail3.newsletter.nerds.io[188.8.131.52]:25, delay=2215, delays=2215/0.01/0.11/0.05, dsn=4.4.2, status=deferred (lost connection with mail3.newsletter.nerds.io[184.108.40.206] while sending end of data -- message may be sent more than once)
Chip 01:03, 20 November 2015 (EST)