Is it possible to block a destination email address?

NethServer Version: 7.9.2009
Module: Email
I saw this post but I don’t think that is applicable in my case.
The problem is that we have started to receive spam on an address in the format user+addon@domain.tld. We would like to be able to block that specific address while still allowing to get mail to user@ and all other user±addresses. Is that doable?

I can’t test this right now, but you may try creating a new email address for user+addon@domain.tld and set it to Local network only.

I can’t get it to work. Maybe it’s because all delivered mail looks like it comes from the internal network since spam filtering and some other things are done in the firewall before the mail is sent to Nethserver, When I look in the logs on Nethserver is the sending SMTP server from an IP on the same subnet.

Then you should exclude the IP address of the firewall from relay.
Write “ip.addr.of.fw REJECT” in /etc/postfix/access.cidr using a custom template.

1 Like

Wouldn’t that just block all incoming mail? The MX record for the domain points to the firewall where I do spam and virus checks before forwarding to Nethserver.

@filippo_carletti Do you know if it’s possible or not?

AFAIK it should only block relay, not all mail.
I’m sorry, I can’t test this.

OK, I’ll take a second look to see if it’s possible to filter in the firewall and in worst case we have to add a sorting rule in the mailbox.

AFAIK, without mail filtering-features, firewalls chews ip and ports, not email addresses

Try this:

In cockpit

https://your.server.tld:9090

Application → Email → Filter
In “Rules” click on “Add rule”
Action: Block From
Email address or domain: user+addon@domain.tld