Thanks a lot Viktor,
That's heavy, but safe !

--
Samuel Torton


-----Original Message-----
From: owner-postfix-us...@postfix.org <owner-postfix-us...@postfix.org> On 
Behalf Of Viktor Dukhovni
Sent: 08 March 2019 16:20
To: postfix-users@postfix.org
Subject: Re: consolidate virtual and relay_recipients files

On Wed, Mar 06, 2019 at 05:34:03PM +0000, Samuel Torton wrote:

> virtual_alias_maps = hash:/etc/postfix/virtual relay_recipient_maps = 
> hash:/etc/postfix/relay_recipients
> transport_maps = hash:/etc/postfix/transport ...
> ++++
> 
> Here is my /etc/postfix/virtual:
> ++++
> ...
> @domain2.com                @domain1.com
> @domain3.com                @domain1.com
> @domain4.com                @domain1.com
> ...

The problem is the wildcard entries.  The solution is to have explicit mappings 
for each valid address (each user at each domain).

> Here is my /etc/postfix/relay_recipients:
> ++++
> ...
> us...@domain1.com     x
> us...@domain1.com     x
> us...@domain1.com     x
> us...@domain1.com     x
> ...

Once all the valid addresses are in virtual_alias_maps, the relay_recipients 
table can be empty (note that's different from an empty setting of 
"relay_recipient_maps", you should set to a table, whose *content* is empty, or 
perhaps contains just the postmaster mappings).

-- 
        Viktor.


Reply via email to