mirror of
https://github.com/decke/smtprelay.git
synced 2026-04-25 04:45:52 +03:00
[GH-ISSUE #25] config.go allowedUsers not working? #7
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/smtprelay#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @winkler-winsen on GitHub (Mar 30, 2021).
Original GitHub issue: https://github.com/decke/smtprelay/issues/25
Hi...
Tried well with Thunderbird (for testing) and following
config.gosettings:Created file
userlist(Example, password hashed withgo run cmd\hasher.go test):user@mail.com $2a$10$SN1obpmbzZoWI9vkrycRNe9V6wr0bsX0SiZvFVGTfM95GwNP.ai0aSet allowedUsers in
config.gopointing to createduserlistfile:allowedUsers = flag.String("allowed_users", "userlist", "Path to file with valid users/passwords")After setting
allowedUsersto filename with user and hash in it, I cannot force Thunderbird to send mail with same settings. Checked username and password twice. Checked also different settings for SMTP auth methods. Thunderbird states "Autentication Required."Did some newbee log outputs to test functions from
auth.go.AuthFetch()is calledAuthCheckPassword()never calledparseLine()never calledChecked with log level debug and trace, but no hints showing up.
Any ideas, what I'm thinking or doing wrong? Or is it a bug?
Regards
Lars
@JonathonReinhart commented on GitHub (Mar 31, 2021):
Hi @winkler-winsen,
Why are you modifying the
config.gofile to adjust settings? You should either:-config smtprelay.ini-- note that in this case the path is relative to the directory containing the executablePlease post your exact command line for running
smtprelay, and include your.inifile if you use .-config.Please note that if authentication is required (via
-allowed_users), then TLS (either-listen starttls://...or-listen tls://...) must be configured and used by the client.I did open an issue (#26) to make this more obvious.
My testing notes (from current
master(03b8b78f53), for posterity:Building, configuring, and running the server:
Testing with
swaksw/o authentication (fails with530 Authentication Requiredas expected):Testing with
swaksw/ authentication (fails becauseAUTHextension is never given by server, because not using TLS):@winkler-winsen commented on GitHub (Mar 31, 2021):
Hello @JonathonReinhart ,
thanks for quick reply.
Didn't know the parameter
-config smtprelay.ini, just thought .ini file will be read automatically and wondered that nothing worked. So I started editingconfig.gofile. ;-)So working with
-config smtprelay.iniworks well. First problem solved. ThanksThis point, I didn't know either. Thanks for pointing this out and updating the code.
I planned to use smtpreply as a relay for unsecure client (is not STARTTLS, SSL/TLS capable) to use him with modern well configured SMTP server (e.g. smtp.office365.com:587)
So I will not use
-allowed_usersthats fine for me on a local server.Thanks
Lars
@decke commented on GitHub (Apr 2, 2021):
Fixed in #27