-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid sender responses #12
Comments
Thanks @nexces RFC5321 (section 3.3) is explicit on the permitted syntax for MAIL and RCPT commands:
and
Worth mentioning that RFC821 also doesn't permit any other RCPT/MAIL command syntax, but it isn't as explicitly documented. Do you have examples of MTAs which support the broken syntax? And what SMTP client are you using? It would be better for those libraries fix their SMTP support, rather than altering MailHog to support invalid syntax (the broken syntax, for example, isn't supported by Google Mail in any way). Having said that, it would be possible to add a feature flag to enable less strict parsing of some commands, I'm just not really sure that's the most appropriate solution. |
For this moment I can only confirm that Postfix accepts all mentioned formats and M$ Exchange accepts at least
I might be able to test more MTA in few days. |
This appears to be a broken implementation for SwiftMailer - I've just opened an issue: swiftmailer/swiftmailer#573 It can be fixed in MailHog (fairly easy, its just a regex change), but would prefer not to unless the "fix" was added as a feature flag. |
I've got curious by your statement that Google Mail does not accept broken syntax so I've tested it using SwiftMailer.
|
You're right - thought I'd tested it at the time, looks like I was wrong! Not entirely happy about intentionally breaking SMTP spec, but who am I to argue with Google? 😄 I'll update the regex to support the broken syntax! |
"You're the man!" to argue with Google. ;) |
its fixed ? for me MailHog dont work with swiftmailer 5.4.1 i dont know why... "Exception occurred while flushing email queue: Connection could not be established with host....." any idea please ? |
It seems that MailHog accepts only single form of sender in MAIL FROM command, which is:
putting space after colon or omitting angle brackets like
leads to "550 Invalid sender" however most MTAs accepts those as valid forms.
The text was updated successfully, but these errors were encountered: