mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 08:45:54 +03:00
[GH-ISSUE #375] Recipient allowlist on smtpd #246
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#246
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 @sorcix on GitHub (Oct 17, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/375
I'm using Mailpit as a simple single-user temporary e-mail server. While I understand it's not meant to be used like this, it actually works really great. The only downside, for my use case, is that it accepts every random message sent to port 25.
Would you accept a PR that adds an additional flag
--smtp-allow-recipientsthat takes a regex and rejects/drops e-mails where the recipient doesn't match? Could be used with something like@(temp.example.com|foo.com)$.@axllent commented on GitHub (Oct 17, 2024):
I'm pretty sure this already exists.
From the docs:
--smtp-allowed-recipients: Only allow SMTP recipients matching a regular expression. Use this to restrict incoming mail to only those sent to a pre-defined list. An example would be--smtp-allowed-recipients '@example.com$'to only allow emails sent to recipients ending in@example.com.@sorcix commented on GitHub (Oct 17, 2024):
D'oh. I managed to overlook an option that's named almost the same as what I proposed. That's what I was looking for, thanks.
@axllent commented on GitHub (Oct 17, 2024):
All good ;-) There's a lot of options unfortunately, so sometimes easy to overlook stuff.