Subject: Re: Sendmail: extraneous duplicate detection
To: Havard Eidnes <Havard.Eidnes@runit.sintef.no>
From: Eric Allman <eric@CS.Berkeley.EDU>
List: netbsd-bugs
Date: 12/11/1993 17:40:18
Re:
: From:  Havard Eidnes <Havard.Eidnes@runit.sintef.no>
: Subject:  Re: Sendmail: extraneous duplicate detection
: Date:  Sun, 12 Dec 1993 02:34:52 +0100

: > Hmmm......  I thought I had fixed this with the uid check, but I
: > obviously botched it.  However, your fix has some other problems.
: 
: What are those?

You might have two aliases that forward to the same program, and a
super-alias that includes both of them.  This should get one copy,
not two.  There are a few other cases, admittedly pretty contrived.

: > I suggest the following patch instead:
: 
: Hmm, with your patch, a given user can't have more than one prog mailer
: invoked for him directly from his .forward file.  Bug or feature?

Huh?  If they are different programs, it works fine.

: Furthermore, your fix appears not to work...  I just tested it:
: 
: rype# pwd
: /usr/users
: rype# cat u[12]/.forward
: "|/bin/sh -c '/bin/cat >>/tmp/msg'"
: "|/bin/sh -c '/bin/cat >>/tmp/msg'"
: rype# 
: rype# sendmail -bv -v u1 u2
: /usr/users/u1/.forward: line 1: forwarding to "|/bin/sh -c '/bin/cat >>/tmp/m
sg'"
: /usr/users/u2/.forward: line 1: forwarding to "|/bin/sh -c '/bin/cat >>/tmp/m
sg'"
: "|/bin/sh -c '/bin/cat >>/tmp/msg'"... deliverable: mailer prog, host , user 
"|/bin/sh -c '/bin/cat >>/tmp/msg'"
: rype# 

Try having two users with the same program -- that will work.  You
have tried a somewhat unusual case.

: Really sending a piece of mail turned up only one copy in /tmp/msg as well,
: and only one log entry in /var/log/maillog.  So, sorry, no dice.  I still
: think my fix is more correct, because with it I get:
: 
: rype# sendmail -bv -v u1 u2
: /usr/users/u1/.forward: line 1: forwarding to "|/bin/sh -c '/bin/cat >>/tmp/m
sg'"
: /usr/users/u2/.forward: line 1: forwarding to "|/bin/sh -c '/bin/cat >>/tmp/m
sg'"
: "|/bin/sh -c '/bin/cat >>/tmp/msg'"... deliverable: mailer prog, host , user 
"|/bin/sh -c '/bin/cat >>/tmp/msg'"
: "|/bin/sh -c '/bin/cat >>/tmp/msg'"... deliverable: mailer prog, host , user 
"|/bin/sh -c '/bin/cat >>/tmp/msg'"
: rype# 
: 
: which is what I should get, IMHO.
: 
: - Havard

eric

------------------------------------------------------------------------------