[GH-ISSUE #333] Relay recipient blocklist #221

Closed
opened 2026-03-15 13:17:57 +03:00 by kerem · 5 comments
Owner

Originally created by @zmweske on GitHub (Jul 11, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/333

First off, I love this application and thank you for creating and maintaining it.

Would you consider creating a blocklist as well? I think that one simple reason for this would be to block all emails sent to admin@admin.lan for some services so they don't spam a downstream SMTP provider (and prevent spam filtering).

Similar to the allowlist defined by --smtp-relay-matching, the blocklist would (in the same but opposite way- list below copied from https://github.com/axllent/mailpit/issues/108#issuecomment-1535317838):

  • auto-forwarding silents drops addresses on the blocklist (logged in debug), and sending all other matching addresses (if any). A disallowed address should not block any others from being sent.
  • API / frontend will not allow any sending the address list contains invalid addresses, and return an error if any addresses are not allowed
  • Frontend would ideally warn beforehand when entering the address

Haven't had time to set up a dev environment yet, but based on #108, it should be very similar with just the inverse logic and an extra branch for the config flag?

Thanks again for your work with this project!

Originally created by @zmweske on GitHub (Jul 11, 2024). Original GitHub issue: https://github.com/axllent/mailpit/issues/333 First off, I love this application and thank you for creating and maintaining it. Would you consider creating a blocklist as well? I think that one simple reason for this would be to block all emails sent to [admin@admin.lan](mailto:admin@admin.lan) for some services so they don't spam a downstream SMTP provider (and prevent spam filtering). Similar to the allowlist defined by `--smtp-relay-matching`, the blocklist would (in the same but opposite way- list below copied from https://github.com/axllent/mailpit/issues/108#issuecomment-1535317838): - auto-forwarding silents drops addresses on the blocklist (logged in debug), and sending all other matching addresses (if any). A disallowed address should not block any others from being sent. - API / frontend will not allow any sending the address list contains invalid addresses, and return an error if any addresses are not allowed - Frontend would ideally warn beforehand when entering the address Haven't had time to set up a dev environment yet, but based on #108, it should be very similar with just the inverse logic and an extra branch for the config flag? Thanks again for your work with this project!
kerem 2026-03-15 13:17:57 +03:00
Author
Owner

@axllent commented on GitHub (Jul 12, 2024):

Thank you for opening a new issue @zmweske. I will look into this in the near future and see what I can do.

<!-- gh-comment-id:2225334630 --> @axllent commented on GitHub (Jul 12, 2024): Thank you for opening a new issue @zmweske. I will look into this in the near future and see what I can do.
Author
Owner

@axllent commented on GitHub (Jul 14, 2024):

@zmweske I have added this feature in v1.19.1 and is documented here.

Please let me know if this works as you expected?

<!-- gh-comment-id:2227180506 --> @axllent commented on GitHub (Jul 14, 2024): @zmweske I have added this feature in [v1.19.1](https://github.com/axllent/mailpit/releases/tag/v1.19.1) and is [documented here](https://mailpit.axllent.org/docs/configuration/smtp-relay/). Please let me know if this works as you expected?
Author
Owner

@axllent commented on GitHub (Jul 21, 2024):

I'm closing this issue as it was released a week ago. Please feel free to re-open if there are issues.

<!-- gh-comment-id:2241468289 --> @axllent commented on GitHub (Jul 21, 2024): I'm closing this issue as it was released a week ago. Please feel free to re-open if there are issues.
Author
Owner

@zmweske commented on GitHub (Jul 23, 2024):

Had been busy but finally got around to testing it out- works like a charm- thanks so much!

<!-- gh-comment-id:2246429803 --> @zmweske commented on GitHub (Jul 23, 2024): Had been busy but finally got around to testing it out- works like a charm- thanks so much!
Author
Owner

@axllent commented on GitHub (Jul 24, 2024):

Great, thanks for the feedback!

<!-- gh-comment-id:2246636226 --> @axllent commented on GitHub (Jul 24, 2024): Great, thanks for the feedback!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#221
No description provided.