-
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
smtp auth #7
Comments
Could you expand a bit please - support for SMTP AUTH (RFC4954) is already there. Authentication is essentially ignored, but it allows for testing of clients which are already configured to use authentication. Do you mean there's an authentication mechanism missing that you need, or do you want to be able to configure valid users/passwords etc? |
I use python/pylons with turbomail
When i send email, I get error
Am confused as I can see in the code it checks for credentials, but what are the "credentials".. ie user/pass |
It would be fantastic is the user/pass was configurable eg -u mail@user.com -p secret |
Any chance you could provide log output from Go-MailHog when you try? Sounds like a bug! SMTP AUTH should be supported, once EHLO/HELO is received Go-MailHog is in MAIL state, which should accept the AUTH command, but I might have messed up the implementation! There aren't any real credentials - Go-MailHog should accept any username/password combination for CRAM-MD5, PLAIN, LOGIN and EXTERNAL mechanisms, so it can be a drop-in replacement for any mail server without having to think about configuring authentication. Adding support for setting a username and password would be relatively easy - but I'm not sure it would be all that useful? |
and some turbo mail output with debug=on, different time, same error
|
It would for me, even making it periodically fail to test connection, password et all in debugging. |
thanks for the log output - bug is not accepting lowercase commands (e.g. "ehlo" instead of "EHLO") - should be an easy fix, I'll have a look today sometime good point re auth config - i'll have a look as part of #8 |
I like the authconfig, not convinced on randomly failing to authenticate. I think that's really not a responsibility of Mailhog and should be implemented via integration tests in the app that makes use of Mailhog |
Wouldn't it be more difficult to get the mail client to simulate connection failures than have them simulated by the mail server? And client side code changes then become implementation specific (e.g., you might have to rewrite the same "connection failure simulation" code in 10 different application stacks) If this was supported in MailHog, it would be consistent across all applications being tested, and would more closely simulate infrastructure failures rather than client library failures. This discussion should probably be on #8 instead, but personally I quite like the idea. |
(You're right, I think this was mentioned in #8 and I mixed up the issues :))
If I understand the use-case correctly, the idea was that Mailhog would randomly return "incorrect username/pass" errors. Imo, handling such errors could be tested by providing incorrect credentials. So if that is indeed the use-case, I don't think that's something Mailhog should do. Perhaps I misinterpreted the use case. |
You're right, the client could just be given incorrect credentials, although for some platforms that might require reconfiguration and potentially redeployment of the app between credentials changes. Having support for this in MailHog would give more flexibility (as mentioned in #8), e.g. adding lag, timeouts or dropped connections, which would be more difficult to achieve client-side. If it is implemented it wouldn't affect the normal behaviour of MailHog anyway, by default MailHog would work as it currently does. edit: this is sort of similar to the Netflix Chaos Monkey |
That's precisely my use case, I got three applications, and I just want the "smtp server to fail" for testing. Otherwise I need to modify and test each client use case, which is very difficult sometimes, eg lags and timeouts. |
NOTE: the "fails" options need to optional, so users who dont want the "errors" can contunue as normal. |
OK, clear. I'm fine with that as long as it is indeed optional :) |
Implement smtp auth and a config for smtp auth
The text was updated successfully, but these errors were encountered: