I took this to mean I should get rid of relay_domains altogether, and rely solely on relay_recipients. But once I did that, it now rejects all addresses.

I want to make sure I am being clear about my ultimate goal:

I want Postfix to accept only the addresses in /etc/postfix/relay_recipients(.db) and reject any other addresses. Then pass on mail for accepted addresses to the primary MX (or store it if the primary is unavailable).

Thanks.


On Fri, 2 Dec 2022, Wietse Venema wrote:

Based on your earlier posting:

   relay_domains = hash:/etc/postfix/relay_domains

Therefore recipients are primarily validated with relay_recipient_maps.

Based on your earlier posting:

   relay_recipient_maps = hash:/etc/postfix/relay_recipients
   There are no virtual_alias_maps, canonical maps, or masquerade domains

Then, Postfix accepts mail for nonexistentaddr...@fongaboo.com, because

- nonexistentaddr...@fongaboo.com matches $relay_recipient_maps

or

- @fongaboo.com matches $relay_recipient_maps

You can verify that with postmap -q commands.

        Wietse

Reply via email to