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:      [email protected]

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

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
> [email protected] and not to the user [email protected] 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 -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to