From: Victor Duchovni on
On Mon, Dec 21, 2009 at 11:48:55AM +0300, Vladimir Vassiliev wrote:

>
> I discovered next issue with postfix.
> Suppose there is alias:
> alias: user1, user2
>
> If delivery to user1 was successful and to user2 was not (and it was
> tempfail or soft_bounce=yes), then next time postfix will deliver to
> user1 also.

Correct.

> Is there any workarounds?

Whenever possible, for mapping an inpu address to a set of users, use
virtual aliases instead.

virtual(5):
# Drop the LHS domain, if it is $myorigin or in $mydestination, AND
# you want the alias to work all local domains. Do not drop the RHS
# domains.
#
alias(a)example.com user1(a)example.com, user2(a)example.com

main.cf:
# If you have CDB support, use it!
# default_database_type = cdb
#
indexed = ${default_database_type}:${config_directory}/
virtual_alias_maps = ${indexed}virtual

and drop the alias from the local aliases(5) file. Use aliases(5) sparingly,
for running commands, and supporting list managers via ":include:".

There are work-arounds with local aliases(5), but they are less elegant.

--
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomo(a)postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

From: Victor Duchovni on
On Tue, Dec 22, 2009 at 11:36:13AM +0300, Vladimir Vassiliev wrote:

> Thanks. Exactly what I needed.
> alias(a)example.com user1(a)example.com, user2(a)example.com
> Why don't drop RHS domain here (if example.com is local)?

Because you may regret it later, unqualified addresses are implicitly
qualified with $myorigin, which may or may not stay local in the future.

Are you aliasing the user whose email address is "user(a)example.com",
and whose mailbox may be subject to further independent rewriting/routing?

list(a)example.net user(a)example.com, ...

Or are you aliasing the local mailbox of the Unix login account "user"?

list(a)example.net user(a)localhost, ...

Or are you aliasing "user" in the default mail domain of the system
($myorigin), who would receive unqualified email sent by e.g. cron?

list(a)example.net user, ...

For lists, the first use-case is the most common. The 3rd use-case
leads to surprises when $myorigin is changed to be non-local, but
local delivery was intended (a mis-configured case 2).

--
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomo(a)postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.