-
Notifications
You must be signed in to change notification settings - Fork 149
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
SASL passwords are created with the container's hostname as domain #192
Comments
So, according to the documentation, usernames must always include a domain for SASL. In other words. User cannot be `johhny` but `johhny@example.org`. Further info can be found on this ticket: #192 This commit will automatically append domain if one is not provided in `SMTPD_SASL_USERS`.
Hi, thanks for this detailed report. You are, in fact, correct. The documentation was not clean enough on that part. The latest commit to master should have this fixed. Please do kindly test and let me know if you run into any additional issues. |
Hi, I haven't build this yet but had a quick look through the source and will test next weekend. I think the bad users handling is unnecessary, i.e. you can always pass a sensible domain default, and the user can override this if desired: /tmp # echo test | saslpasswd2 -p -c -u example.com bokysan
/tmp # echo test | saslpasswd2 -p -c -u example.com bokysan@example.net
/tmp # sasldblistusers2
bokysan@example.net: userPassword
bokysan@example.com: userPassword Also, it would be helpful to call |
The problem is legacy. If users are already using it as-is they won't notice the change and will complain why authentication stopped working all of a sudden. |
Generally not the best idea to log the passwords on the console. True, they are provided as environment variables, but in Kubernetes, for example, they can read from Logging them directly into console at startup seems really bad to me. |
And I don't see how your current solution is any different with regards to backwards compatibility. If someone currently relies on With You can test both with the example I gave you earlier today ;) |
|
Re: the Debian image, the latest commit made it work again with SMTPD_SASL_USERS now. There's another issue though:
I think it's the repeated copy here: docker-postfix/scripts/common-run.sh Line 157 in a26f85d
(ignore the original post, /var/spool/postfix/etc was a file in my mounted volume!?). |
I've also rebuild master using alpine:latest - no major issues. Occasionally the following appears in the log file, but I can't reproduce this.
Another thought: switching between base images and keeping the same volume for |
That would be nice, yes. Thank you. 🙂 |
Agreed. When I created alternate images I did not imagine that people would be switching between them back and forth. But your tool does get used in ways you've never expected. When starting you do get a warning but it would be prudent to add to docs that you should be doing this only if you really know what you're doing. I'm against deleting anything, though - this is not something you'd expect an image to do and can come back and bite you in the a**. If anything I'd opt for killing the image and letting the user deal with this on his own. I'll open another ticket on the topic if I just don't fix it in one commit. |
Current
boky/postfix:latest-alpine
, postfix v3.8.4.I've been trying to force authentication using SMTPD_SASL_USERS="user:pass". However, it didn't work as expected. Long story short, this is what ended up in sasldb
When I use
user@<containername>
it all works as expected - except that the mail is bounced by Gmail and probably others ('From' header has non compliant domain name). I tracked this down topostfix_setup_smtpd_sasl_auth()
incommon-run.sh
. It might need changing like this (see SASL_README):When used in conjunction with the below, postfix would accept both
user
anduser@example.com
as valid user names.Another option would be to specify
SMTPD_SASL_USERS='user@example.com:password,...'
, which I've started using now. If the behaviour on other platforms is the same, it might be worth adding this to the README where it mentions SMTPD_SASL_USERS.Speaking of other platforms, there's probably another issue in this function. When using the Debian based image
boky/postfix:latest
with SMTPD_SASL_USERS, the container keeps restarting:A simple check if this file exists or using
ln -s -f
might fix it. They both look identical, I haven't investigated any further than this.Many thanks for providing this image, by the way!
The text was updated successfully, but these errors were encountered: