procmail
[Top] [All Lists]

procmail is duplicating messages?

1997-06-06 09:26:00

(BTW, thanks P.G. for the help with the large message recipe)

version 3.11pre7 on UltraSPARC Solaris 5.5.1

Most incoming messages now match _no_ recipes and drop into $DEFAULT.
(Which is what I want for now.)

But out of these, I get two copies of most of them.  Occasionally
I get a single copy.  There is only one log entry with no apparent
problems, yet the mail spool file gets two copies.  I think that procmail
is not running twice, because only one copy of the message goes into the
backup directory, and the backup file name only appears in one log entry.
Here is one such log, followed by .procmailrc:

procmail: [22773] Fri Jun  6 06:07:23 1997
procmail: Assigning "TRAP=formail -XTo: -XSubject: -XCc: -XFrom: -XDate:  \
-XReply-To:  -XReceived: -XX-Mailing -XTag: -XX-Loop: \
-XApparently- -XX-Envelope- -IResent-Bcc:           ; \
echo "========================================"
"
procmail: Assigning "LASTFOLDER=backup/msg.buOF"
procmail: Opening "backup/msg.buOF"
procmail: Acquiring kernel-lock
procmail: [22773] Fri Jun  6 06:07:24 1997
procmail: Assigning "LASTFOLDER= cd backup && rm -f dummy `ls -t msg.* | sed -e 
1,100d`"
procmail: No match on ">10000"
procmail: Locking "/var/mail/wwgrol.lock"
procmail: [22773] Fri Jun  6 06:07:24 1997
procmail: Executing " cd backup && rm -f dummy `ls -t msg.* | sed -e 1,100d`"
procmail: Assigning "LASTFOLDER=/var/mail/wwgrol"
procmail: Opening "/var/mail/wwgrol"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/mail/wwgrol.lock"
procmail: Notified comsat: "wwgrol(_at_)122135:/var/mail/wwgrol"
procmail: Assigning "EXITCODE=0"
procmail: Executing "formail -XTo: -XSubject: -XCc: -XFrom: -XDate:  \
-XReply-To:  -XReceived: -XX-Mailing -XTag: -XX-Loop: \
-XApparently- -XX-Envelope- -IResent-Bcc:           ; \
echo "========================================"
"
Received: from most by sparc01.hac.com (SMI-8.6/SMI-SVR4)
        id GAA22771; Fri, 6 Jun 1997 06:07:22 -0500
Received: by most (4.1/SMI-4.1)
        id AA01805; Fri, 6 Jun 97 06:07:23 EST
Received: from pseult01.fw.hac.com(151.168.5.5) by most via smap (V1.5khhunt)
        id sma001803; Fri Jun  6 06:07:03 1997
Received: from most ([151.168.254.82]) by pseult01.fw.hac.com
          (Netscape Mail Server v2.02) with SMTP id AAA5146
          for <wwgrol(_at_)pseult01>; Fri, 6 Jun 1997 06:06:47 -0500
Received: by most (4.1/SMI-4.1)
        id AA01800; Fri, 6 Jun 97 06:07:00 EST
Received: from gw1.fw.hac.com(151.168.254.46) by most via smap (V1.5khhunt)
        id sma001798; Fri Jun  6 06:06:48 1997
Received: by  gw1.fw.hac.com (4.1/SMI-4.1)
        id AA01322; Fri, 6 Jun 97 06:06:47 EST
Received: from dfw-ix11.ix.netcom.com(206.214.98.11) by 
gw1.hughes-defense-comm.com via smap (3.2)
        id xma001319; Fri, 6 Jun 97 06:06:32 -0500
Received: (from smap(_at_)localhost)
          by dfw-ix11.ix.netcom.com (8.8.4/8.8.4)
          id GAA09180; Fri, 6 Jun 1997 06:04:22 -0500 (CDT)
Received: from syr-ny3-42.ix.netcom.com(206.217.109.106) by 
dfw-ix11.ix.netcom.com via smap (V1.3)
        id sma009175; Fri Jun  6 06:04:20 1997
Date: Fri, 06 Jun 1997 07:05:23 -0500
From: Vance Christiaanse <cintech(_at_)ix(_dot_)netcom(_dot_)com>
Reply-To: cintech(_at_)ix(_dot_)netcom(_dot_)com
To: Barb Christiaanse <BJCNY(_at_)aol(_dot_)com>, Beth Wagner 
<wagnere(_at_)syr(_dot_)lmco(_dot_)com>,
        Catie Christiaanse <CJC81(_at_)aol(_dot_)com>,
        Chris Chappell <cchappell(_at_)astro(_dot_)sensis(_dot_)com>,
        Craig Dickinson <McCraiger(_at_)Juno(_dot_)com>,
        Mark Christiaanse <markcny(_at_)aol(_dot_)com>,
        "Me (Cintech)" <cintech(_at_)ix(_dot_)netcom(_dot_)com>,
        Paul Kosinski 
<Paul_Kosinski(_at_)msmgate(_dot_)mrg(_dot_)uswest(_dot_)com>,
        Paul Springer <springer(_at_)syr(_dot_)lmco(_dot_)com>, Phil DePuy 
<depuy(_at_)syr(_dot_)lmco(_dot_)com>,
        Roger Erdvig <RErdvig(_at_)aol(_dot_)com>,
        Un Joo Mun-DeLelys <unjoo(_at_)utica(_dot_)lmco(_dot_)com>,
        Wanda McCrae <mccrae(_at_)syr(_dot_)lmco(_dot_)com>,
        Wes Groleau <wwgrol(_at_)pseult01(_dot_)fw(_dot_)hac(_dot_)com>
Subject: Thursday's Word / Friday's Word
========================================

PATH        = /bin:/usr/bin:/usr/home/wwgrol/bin
MAILDIR     = $HOME/Mail
DEFAULT     = /var/mail/wwgrol
LOGFILE     = $MAILDIR/Logs/`date '+%y%m%d_%H%M%S'`_$$
LOGABSTRACT = no
VERBOSE     = yes

### Trap info for the log
TRAP='formail -XTo: -XSubject: -XCc: -XFrom: -XDate:  \
-XReply-To:  -XReceived: -XX-Mailing -XTag: -XX-Loop: \
-XApparently- -XX-Envelope- -IResent-Bcc:           ; \
echo "========================================"
'

#### copied from man page: cache last 100 messages
:0 c
backup

:0 ic
| cd backup && rm -f dummy `ls -t msg.* | sed -e 1,100d`

# =====================================Bounce anything large
:0
* >10000
{
  # Grab the entire header.  Don't worry about chopping
  # out the Received: lines, as $HEADER won't be used for
  # that, but rather to generate the reply header.
  # HEADER=|formail -IReceived: -I"From "
  :0h
  HEADER=|cat

  # The reply will be generated from the contents of the $HEADER
  # variable, while what we send down the pipe from procmail
  # will be fed through formail to appear in the body of the
  # message
  :0
  |(echo "$HEADER"                                                | \
    formail -ri"Subject: Mail Delivery Refused: Too Large"        ; \
    echo "I don't take mail this big without prior agreement."    ; \
    echo "* - If it is not from you, then someone's forging   *"  ; \
    echo "*   your address--need any help catching them?      *"  ; \
    echo "* - If it is legitimate, contact me for delivery    *"  ; \
    echo "*   instructions.  (smaller email OK for contact)   *"  ; \
    echo "* - If the message was unsolicited advertising,     *"  ; \
    echo "*   do NOT try again.  Storing your advertisements  *"  ; \
    echo "*   on our disks is TRESPASSING.                    *"  ; \
    echo "   "                                                    ; \
    echo " ------- Undelivered message follows --------------- "  ; \
    echo ""                                                       ; \
    formail -IReceived:                                           | \
  ) $SENDMAIL $SENDMAILFLAGS -t
}



# Anything not yet matched goes directly to mailtool (or whatever).

# < END OF FILE >

<Prev in Thread] Current Thread [Next in Thread>
  • procmail is duplicating messages?, W. Wesley Groleau x4923 <=