On Tue, May 10, 2022 at 09:03:59AM +0200, [email protected] wrote:
> userA and userB are real local users with a mailbox. What happens in
> case of an aliases line like this:
>
> userA: userA, userB
>
> Does it deliver to local users userA and userB? I assume that it does not
> loop.
Yes, if all goes well, and "$myorigin" is listed in "$mydestination",
then the message is delivered to both users without a loop.
However, if one delivery soft-fails (mailbox full, ...), but the other
succeeds, then the behaviour is suboptimal, because both will be
retried later (there's only one queue-file recipient with local
aliases(5)), and the "good" recipient will get multiple copies of
the message.
For this and other reasons, it is best to avoid local aliases(5) as much
as possible, and use virtual(5) aliases instead.
main.cf:
indexed = ${default_database_type}:${config_directory}/
virtual_alias_maps = ${indexed}virtual
transport_maps = ${indexed}transport
transport
localhost.localdomain local
virtual:
userA [email protected], [email protected]
Use local aliases(5) solely for ":include:" mailing lists, other lists
with an "owner-" alias and perhaps "|command" aliases (that will run as
"nobody").
--
Viktor.