Daniel Gnoutcheff:

Checking application/pgp-signature: FAILURE
-- Start of PGP signed section.
> Hello all,
> 
> One of the mailservers I maintain has something like this in its
> /etc/aliases:
> 
> > user1: user1, us...@some.other.domain.org

This means: deliver mail for 'user1' to 'user1' and to
'us...@some.other.domain.org'.

> > mailinglist: user1, user2, user3, user4, adminuser
> > owner-mailinglist: adminuser

This means: deliver mail for 'mailinglist' as a new message with
sender 'adminuser' and recipients 'user1', 'user2', 'user3', 'user4',
'adminuser.' 

This means the message is subjected again to virtual alias expansion,
something that you may have overlooked. This virtual alias expansion
would happen only when you have an 'owner-mailinglist' alias.

> The goals being:
> - Mail sent to <us...@our.domain.org> should be saved on the local
>   server, but should also be forward to `some.other.domain.org`.
> - <mailingl...@our.domain.org> should be a simple mailing list to which
>   all staffmembers are subscribed, and
> - mailinglist bounces (e.g. due to misconfiguration) should go to
>   `adminuser`.
> 
> However, with this configuration, mail sent to mailinglist@ is delivered
> to <us...@some.other.domain.org> *twice*.  If I remove the
> `owner-mailinglist` alias, the problem disappears.

I cannot reproduce this: with the `owner-mailinglist` alias present,
everyone gets one copy in their local mailbox.

    mailinglist: wietse, test, root
    owner-mailinglist: root
    test: test, t...@example.com

First, mail to 'mailinglist' is forwarded as a new message without
any mailbox or off-site delivery:

Jul 21 09:52:05 wzv postfix/pickup[3011]: 1A543A0033: uid=0 from=<root>
Jul 21 09:52:05 wzv postfix/cleanup[3023]: 1A543A0033: 
message-id=<20160721135205.1a543a0...@wzv.example.com>
Jul 21 09:52:05 wzv postfix/qmgr[3012]: 1A543A0033: 
from=<r...@wzv.example.com>, size=450, nrcpt=1 (queue active)
Jul 21 09:52:05 wzv postfix/cleanup[3023]: 1F2D4A0032: 
message-id=<20160721135205.1a543a0...@wzv.example.com>
Jul 21 09:52:05 wzv postfix/local[3025]: 1A543A0033: 
to=<mailingl...@wzv.example.com>, orig_to=<mailinglist>, relay=local, 
delay=0.06, delays=0.04/0.01/0/0, dsn=2.0.0, status=sent (forwarded as 
1F2D4A0032)
Jul 21 09:52:05 wzv postfix/qmgr[3012]: 1A543A0033: removed

Then, it is delivered to the individual recipients, and forwarded
to the off-site destination:

Jul 21 09:52:05 wzv postfix/qmgr[3012]: 1F2D4A0032: 
from=<owner-mailingl...@wzv.example.com>, size=592, nrcpt=4 (queue active)
Jul 21 09:52:05 wzv postfix/local[3025]: 1F2D4A0032: to=<r...@wzv.example.com>, 
relay=local, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to 
mailbox)
Jul 21 09:52:05 wzv postfix/local[3025]: 1F2D4A0032: to=<t...@wzv.example.com>, 
relay=local, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to 
mailbox)
Jul 21 09:52:05 wzv postfix/cleanup[3023]: 219D3A0033: 
message-id=<20160721135205.1a543a0...@wzv.example.com>
Jul 21 09:52:05 wzv postfix/qmgr[3012]: 219D3A0033: 
from=<owner-mailingl...@wzv.example.com>, size=727, nrcpt=1 (queue active)
Jul 21 09:52:05 wzv postfix/local[3025]: 1F2D4A0032: to=<t...@wzv.example.com>, 
relay=local, delay=0.01, delays=0/0/0/0.01, dsn=2.0.0, status=sent (forwarded 
as 219D3A0033)
Jul 21 09:52:05 wzv postfix/local[3025]: 1F2D4A0032: 
to=<wie...@wzv.example.com>, relay=local, delay=0.02, delays=0/0.01/0/0, 
dsn=2.0.0, status=sent (delivered to mailbox)

So, no duplication. If you have duplication, perhaps there is a virtual alias
that you forgot to tell us about.

One puzzle: the above log says 'nrcpt=4' It takes too much time to figure out
what this means. I can look at that in the train ride home from work.

        Wietse

Reply via email to