procmail
[Top] [All Lists]

Re: Duplicate mail using aliases

2004-10-12 01:59:56

Don replies - see text starting with "*** DBW ***"


----- Original Message ----- 
"Dallman Ross" wrote ...

Don replies ...

SOLARIS works and has worked but LINUX still produces duplicates when
using an alias from /etc/aliases for the list of recipients.

In both cases, the alias entry forwards to one local address and one
external address - on LINUX only both get duplicates.

Same recipe on both except for domain names...

# forward test_letter subjects
:0
* ^Subject:.*VAND test_letter
* ^To:(_dot_)*sadmin(_at_)soldom(_dot_)com
* !^X-Loop: xloop(_at_)soldom(_dot_)com
| formail -k -X "From:" -X "Subject:" \
        -I "To: testletter" -X "To:" \
        -A "X-Loop: xloop(_at_)soldom(_dot_)com" -X "X-Loop:" \
        | $SENDMAIL -t

Something is creating the duplicates.  It's not this recipe.  It
must be an extraneous c-flag somewhere earlier up in your rc-file
on the linux machine.

*** DBW **** Tested with no other recipes on LINUX with same results -
Duplicates


Here's a sample session log from SOLARIS...

procmail: [17065] Sat Oct  9 16:32:23 2004
procmail: Assigning "COMSAT=no"
procmail: Assigning "COMSAT=no"

Why the double entry for this assignment?

*** DBW *** I have "COMSAT=NO" in my procmailrc file on both systems
(SOLARIS/LINUX) otherwise I get "procmail: Notified comsat:
user(_at_)22879:/var/mail/user " - I commented this out on LINUX - no
difference - still duplicates.


procmail: Executing "/usr/local/bin/spamc"
procmail: [17065] Sat Oct  9 16:32:31 2004
procmail: Match on "^Subject:.*VAND test_letter"
procmail: Match on "^To:(_dot_)*sadmin(_at_)soldom"
procmail: Match on ! "^X-Loop: xloop(_at_)soldom"
procmail: Executing " formail -k -X "From:" -X "Subject:" \
        -I "To: testletter" -X "To:" \
        -A "X-Loop: xloop(_at_)soldom" -X "X-Loop:" \
        | $SENDMAIL -t"
procmail: Assigning "LASTFOLDER= formail -k -X "From:" -X "Subject:" \
        -I "To: testletter" -X "To:" \
        -A "X-Loop: xloop(_at_)soldom" -X "X-Loop:" \
        | $SENDMAIL -t"
From dbwoodw(_at_)earthlink(_dot_)net  Sat Oct  9 16:32:23 2004
 Subject: VAND test_letter
  Folder:  formail -k -X "From:" -X "Subject:" \         -I "To: deadl
1194

There we had successful delivery to the formail/sendmail action.

procmail: [17074] Sat Oct  9 16:32:34 2004
procmail: Assigning "COMSAT=no"
procmail: Assigning "COMSAT=no"
procmail: Executing "/usr/local/bin/spamc"
procmail: [17074] Sat Oct  9 16:32:39 2004
procmail: Match on "^Subject:.*VAND test_letter"
procmail: No match on "^To:(_dot_)*sadmin(_at_)soldom"

This is the message having re-entered your system via procmail.
More about this later.  Since the To: line was changed, the
second condition of the recipe in question fails to match and
we fall through to deliver to Don's mailbox (below).

*** DBW *** Yes SOLARIS is acting right here

procmail: Assigning
"PATH=/export/home/don/bin:/bin:/usr/ucb:/usr/local/bin:/usr/X/bin"
procmail: Locking "/var/mail/don.lock"
procmail: Assigning "LASTFOLDER=/var/mail/don"
procmail: Opening "/var/mail/don"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/mail/don.lock"
From root(_at_)ws5(_dot_)soldom  Sat Oct  9 16:32:34 2004
 Subject: VAND test_letter
  Folder: /var/mail/don
811



================================================

Here's a sample log from LINUX that didn't work ...

procmail: [19217] Sat Oct  9 16:24:44 2004
procmail: Assigning "COMSAT=no"
procmail: Assigning "COMSAT=no"

Again, why the double entry?

*** DBW *** See explanation above.

procmail: Executing "/usr/bin/spamc"
procmail: [19217] Sat Oct  9 16:24:45 2004
procmail: No match on "^Subject:.*VAND dead_letter"
procmail: Match on "^Subject:.*VAND test_letter"
procmail: Match on "^To:(_dot_)*admin(_at_)linuxdom(_dot_)com"
procmail: Match on ! "^X-Loop: xloop(_at_)linuxdom(_dot_)com"
procmail: Executing " formail -k -X "From:" -X "Subject:" \
        -I "To: testletter" -X "To:" \
        -A "X-Loop: xloop(_at_)linuxdom(_dot_)com" -X "X-Loop:" \
        | $SENDMAIL -t"
procmail: Assigning "LASTFOLDER= formail -k -X "From:" -X "Subject:" \
        -I "To: testletter" -X "To:" \
        -A "X-Loop: xloop(_at_)linuxdom(_dot_)com" -X "X-Loop:" \
        | $SENDMAIL -t"

Nothing in the log implies the formail|sendmail didn't work.
Yet the message coming through below does not have altered header
lines.

*** DBW *** Yes

From dbwoodw(_at_)earthlink(_dot_)net  Sat Oct  9 16:24:44 2004
 Subject: VAND test_letter
  Folder:  formail -k -X "From:" -X "Subject:" \  -I "To: testletter"
1195
procmail: [19224] Sat Oct  9 16:24:45 2004
procmail: Assigning "COMSAT=no"
procmail: Assigning "COMSAT=no"
procmail: Executing "/usr/bin/spamc"
procmail: [19224] Sat Oct  9 16:24:46 2004
procmail: Match on "^Subject:.*VAND test_letter"
procmail: Match on "^To:(_dot_)*admin(_at_)linuxdom(_dot_)com"
procmail: Match on ! "^X-Loop: xloop(_at_)linuxdom(_dot_)com"

Notice that we still have the original To: line and we do
not have an X-Loop.  So either (a) this is a duplicate message cloned
by an earlier recipe you're not showing us, so it gets processed
by this recipe (as it should) causing your "duplicate delivery";
or (b) the formail command did not "take."

However, if (b), why would the message re-enter your mail system?  There
would have to be a subsequent recipe also sending things to sendmail
again, or a subsequent recipe failing to deliver and bouncing the
message back to the MTA for later attempt.  But that can't be right
either; otherwise you'd have a mail loop and your system would crash
within minutes.  You'd have hundreds of messages, not just one dupe.
So it has to be what I said above: an earlier recipe that is cloning
the message on your linux system.


*** DBW *** Theory A is blown by my test with nothing else in the procmailrc
but the single recipe which on LINUX still gets duplicates


procmail: Executing " formail -k -X "From:" -X "Subject:" \
        -I "To: testletter" -X "To:" \
        -A "X-Loop: xloop(_at_)linuxdom(_dot_)com" -X "X-Loop:" \
        | $SENDMAIL -t"
procmail: Assigning "LASTFOLDER= formail -k -X "From:" -X "Subject:" \
        -I "To: testletter" -X "To:" \
        -A "X-Loop: xloop(_at_)linuxdom(_dot_)com" -X "X-Loop:" \
        | $SENDMAIL -t"
From dbwoodw(_at_)earthlink(_dot_)net  Sat Oct  9 16:24:45 2004
 Subject: VAND test_letter
  Folder:  formail -k -X "From:" -X "Subject:" \  -I "To: testletter"
1195
procmail: [19233] Sat Oct  9 16:24:46 2004
procmail: Assigning "COMSAT=no"
procmail: Assigning "COMSAT=no"
procmail: Executing "/usr/bin/spamc"
procmail: [19239] Sat Oct  9 16:24:46 2004
procmail: Assigning "COMSAT=no"
procmail: Assigning "COMSAT=no"
procmail: Executing "/usr/bin/spamc"
procmail: Match on "^Subject:.*VAND test_letter"
procmail: No match on "^To:(_dot_)*admin(_at_)linuxdom(_dot_)com"
procmail: Assigning

"PATH=/home/donw1/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R
6/bin"
procmail: Locking "/var/mail/donw1.lock"
procmail: Assigning "LASTFOLDER=/var/mail/donw1"
procmail: Opening "/var/mail/donw1"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/mail/donw1.lock"
From root(_at_)webmail(_dot_)linuxdom(_dot_)com  Sat Oct  9 16:24:46 2004
 Subject: VAND test_letter
  Folder: /var/mail/donw1

The two deliveries shown here prove that (b) above is fallacious, since
there To: line *was* changed by formail in the recipe we're examining.
Once again, this points to the same theory: something has cloned this
message
earlier up on your linux system.  The problem has nothing to do with the
recipe in question.

*** DBW *** tested with nothing else in the procmailrc but the single recipe
which on LINUX still gets duplicates

831
procmail: [19239] Sat Oct  9 16:24:47 2004
procmail: Match on "^Subject:.*VAND test_letter"
procmail: No match on "^To:(_dot_)*admin(_at_)linuxdom(_dot_)com"
procmail: Assigning

"PATH=/home/donw1/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R

Btw, why are you stating a path explicitly?  It is recommended that you not
do that unless you have an unusual reason for wanting to.  The compiled-in
path should suffice except in odd, limited situations.

DBW *** I'm not setting any path - SOLARIS log also shows this, so I don't
think it's relevant since same recipe works fine on SOLARIS

6/bin"
procmail: Locking "/var/mail/donw1.lock"
procmail: Assigning "LASTFOLDER=/var/mail/donw1"
procmail: Opening "/var/mail/donw1"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/mail/donw1.lock"
From root(_at_)webmail(_dot_)linuxdom(_dot_)com  Sat Oct  9 16:24:46 2004
 Subject: VAND test_letter
  Folder: /var/mail/donw1
831

Dallman


*** DBW *** Thanks again for taking a look - at least now I know it's a
LINUX (Fedora Core 2) problem - now on to the task of duplicating the LINUX
environment on another machine to do some more isolation of the problem.
One difference between my current SOLARIS test box and the production LINUX
system is sendmail - the SOLARIS box has the latest 8.13.1 and LINUX has
8.12.11, so that's probably the first thing I'll upgrade when I get a LINUX
test box up.








____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail