AfterShip / email-verifier

:white_check_mark: A Go library for email verification without sending any emails.
MIT License
1.18k stars 149 forks source link

Some existing mailbox on domain without CatchAll are identified as unreachable #72

Open plorgue opened 1 year ago

plorgue commented 1 year ago

Hi,

I tried SMTP check on personnal outlook.fr mailbox and it seems that mx record eur.olc.protection.outlook.com don't like consecutive RCPT TO requests.

On smtp.go, I moved the catchAll block code below the test of the real username and the username is correctly detected as deliverable with 250 smtp response code, however this time the RCPT TO request with random username is rejected by mx record with 452 response code.

This issue probably doesn't concern only outlook.fr.

More generally, it may be a good idea to add a feature "safe check" that check the smtp response code and if it is different to 450 the user’s mailbox was unavailable or similare code it doesn't qualified the mailbox as unreachable. I put this idea here but it may be a different issue.

Thanks for all your work

lryong commented 1 year ago

@plorgue Thanks for your feedback on this issue, it's a good one, the way we handled catchall before may be a bit rough and simple, I'll investigate if there's a better way to handle it. Of course, if you have good suggestions, please feel free to feedback!