mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 00:35:51 +03:00
[GH-ISSUE #550] How to include username and password for sendmail? #355
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#355
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 @mbomb007 on GitHub (Aug 13, 2025).
Original GitHub issue: https://github.com/axllent/mailpit/issues/550
The docs describe how to require username/password for SMTP.
https://mailpit.axllent.org/docs/configuration/smtp/
However, the docs for sendmail don't show a way to include the defined credentials, and sendmail doesn't work anymore if I use something like this:
https://mailpit.axllent.org/docs/install/sendmail/
How does one do this?
@axllent commented on GitHub (Aug 14, 2025):
Hi @mbomb007. There isn't currently any way to configure the sendmail CLI with authentication. This was an intentional decision made based on the fact that the majority (if not all) of other sendmail clients do not support authentication. Typically if you're wanting to use authentication then you would be sending emails with an SMTP-compliant application (ie: the application does the SMTP exchange for you, rather than routing via sendmail). The
--smtp-auth-fileoption is for the SMTP (SMTP server), not the sendmail client.Can you please provide a bit more information about your setup and why you need sendmail to support authentication?
@mbomb007 commented on GitHub (Aug 14, 2025):
I'm using sendmail to send mail to the SMTP server. However, the SMTP server continues to show up in security scans as unsecured, since any machine can send email to the port (testable using telnet). I only use the server for mail from localhost, so I was trying to require a password on the server and have sendmail use it.
@mbomb007 commented on GitHub (Aug 14, 2025):
In the end, though, we did decide it wasn't a real vulnerability, since the mail just ends up in the pit (relay defaults to off) and the only risk is malicious links in a suspicious email. Since sendmail can't be configured that way, I think if I wanted to secure it I would have to use a firewall rule.
@axllent commented on GitHub (Aug 14, 2025):
You can also tell Mailpit to only listen locally for SMTP connections using
--smtp 127.0.0.1:1025orMP_SMTP_BIND_ADDR="127.0.0.1:1025".@mbomb007 commented on GitHub (Aug 14, 2025):
Ah, that's helpful. Thank you!