Categories
Development System & Network

How to configure postfix for sender_access restrictions only for certain destination address

I would like to setup a mail bouncer for a group of people. A sort of simple mailing list. The server is running postfix.

When people email group@example.com, their mail is sent to a number of people on a list who’s members are outside of the example.com (that config is outside of this question and is already working for single forwarding addresses)

Senders are unauthenciated and from any domain. e.g. anyuser@anydomain.com Their address is already stored locally in a membership database.

However that would allow a spammer (should they discover the ‘group’ address) to use the server as a trampoline for spam. spammer@pita.club is not in the database.

So I want to restrict the access to a limited list using sender_access and a backend database.

But I don’t want to block the server as a normal SMTP final destination for all other email.

I.e. mail from anyuser@anydomain.com to user@example.com is processed normally

I know I can use sender_access (or check_sender_access) and a backend database to check the MAIL_FROM. But that would apply to all email.

I only want sender_access to apply to mail intended for group@example.com so that spammer@pita.com is blocked as their address is not in the database.

Leave a Reply

Your email address will not be published. Required fields are marked *