On Thu, Jun 18, 2015 at 07:53:58PM +0000, Steve Zeng wrote:

> transport_maps = hash:/etc/postfix/transport
> 
> /etc/postfix/transport
> ==================
> trustedcompany.com :
> mycompany.com :
> * error:5.1.2 recipient domains not allowed
> 
> It works quite well until it is reported that the logwatch emails are
> blocked. The logwatch email is sent to root user at localhost, which is
> an aliases defined at /etc/aliases.
> 
> 
> /etc/aliases
> ==================
> root: [email protected]
> 
> Is there any way to make the alias map take preference to the transport map?

Yes, if you ask the right question.

While local aliases(5) happen after transport selection, virtual(5)
aliases happen before transport selection.  So turn that into a
virtual(5) alias and you get what you wanted.

-- 
        Viktor.

Reply via email to