On Sun, Apr 20, 2025 at 09:02:43AM +0200, Klaus Tachtler via Postfix-users 
wrote:

> I have a question of understanding:
> 
> If virtual_alias_maps is configured and working successfully and an email
> address is defined in /etc/aliases to forward the emails of the root user,
> the configuration from /etc/aliases is NOT evaluated anymore.

No, use of virtual(5) aliases (on input during queue file creation) does
not in any preclude additional later use of local aliases(5) during
message delivery, when the recipient domain or full recipient address
resolves to a transport handled by the local(8) delivery agent,
typically when the recipient domain is listed in $mydestination.

> /etc/aliases (relevant excerpt)
> # Person who should get root's mail. Don't receive mail as root!
> # Tachtler
> # default: #root: you
> root:      kl...@tachtler.net

If, after any rewriting on input the final recipient is
"root@local.example" and "local.example" is listed in $mydestination,
the transport table directs "root@local.example" to a local(8)-based
transport, then the above alias would redirect the mail to 
"kl...@tachtler.net".

That said, precisely this sort of address-to-address redirect is much
better (more efficiently and reliably) done via virtual aliases.

> An email generated locally as follows would be delivered to the user
> r...@tachtler.net and not to the user kl...@tachtler.net as expected?

If the local(8) delivery agent is bypassed, or $alias_maps is not set to
point to that file, or "newaliases" has not been run, ...  then perhaps
the alias would not take effect.

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to