I read through readme.md and wiki - Email filtering w/ Sieve. But not really find the answer I need.
What I want to achieve is quite basic, just block emails from particular sending address or domain.
Such as block all email from @abuse.com, or [email protected]. Matched emails can be rejected or discarded.
Is there easy way to put unwanted domains into a postfix config file at server level or I have to use Sieve email filtering?
Thanks.
I will mark this appropriately (and as wontfix, since this is a question not actually regarding _docker-mailserver_), but to be honest, this issue tracker is not designed to answer this kind of question, since https://www.google.com should be sufficient:)
Use Postfix smtpd_recipient_restrictions (https://github.com/tomav/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh#email)
Add to config/postfix-send-access.cf
[email protected] REJECT
Use Spamassassin (https://github.com/tomav/docker-mailserver/wiki/FAQ-and-Tips#how-can-i-manage-my-custom-spamassassin-rules)
Add to config/spamassassin-rules.cf:
blacklist_from [email protected]
Use Sieve (https://github.com/tomav/docker-mailserver/wiki/Configure-Sieve-filters)
Add to config/[email protected]:
require ["fileinto", "reject"];
if address :contains ["From"] "[email protected]" {
fileinto "INBOX.spam";
} else {
keep;
}
@x-Felix did the answer from @myavchik solve your issue?
Thank, it works as expected.
NOQUEUE: reject: RCPT from mail-oi1-f196.google.com[209.85.167.196]: 554 5.7.1 <[email protected]>: Sender address rejected: Access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-oi1-f196.google.com>
I read through readme.md and wiki - Email filtering w/ Sieve. But not really find the answer I need.
Could you please add the solution to the wiki?
Most helpful comment
Use Postfix smtpd_recipient_restrictions (https://github.com/tomav/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh#email)
Add to config/postfix-send-access.cf
[email protected] REJECTUse Spamassassin (https://github.com/tomav/docker-mailserver/wiki/FAQ-and-Tips#how-can-i-manage-my-custom-spamassassin-rules)
Add to config/spamassassin-rules.cf:
blacklist_from [email protected]Use Sieve (https://github.com/tomav/docker-mailserver/wiki/Configure-Sieve-filters)
Add to config/[email protected]: