getconversio / email-deep-validator

Verify email address checking MX records, and SMTP connection.
MIT License
124 stars 33 forks source link

Dodge spam traps and other false fails #18

Closed jmnsf closed 5 years ago

jmnsf commented 5 years ago

From these errors:

'550 Anti-Spoofing policy - Inbound not allowed - https://community.mimecast.com/docs/DOC-1369#550\r\n'

'550 5.7.1 <kerstin@kronbruden.se>: Recipient address rejected: Please see http://www.openspf.net/Why?s=helo;id=kronbruden.se;ip=54.78.212.160;r=mailgw1.surf-town.net\r\n'

'550 5.5.1 Protocol error\r\n'

The first two we should just ignore as these are unrelated checks. The last one is from an anti-spam measure/tool; it works by sending a "fake" header, which is multiline, to which if we respond we'll be detected as spammers. This changes the code so that it waits for all multi-line responses to be sent.