procmail
[Top] [All Lists]

No abort after unsetting HOST?

2007-03-01 21:03:15
Hi All,

New to procmail -- new to the list; go easy, please. :)

I'm using a recipe that I found circling around the internet which I was 
hoping would set the Seen flag on some mail as it places it into my maildir.

    :0:
    * ^Subject.*(Security Alerts|Security Events|system check)$
    {
           destdir=.INBOX.systems.logcheck

           :0c
           $destdir/
   
           :0
           * LASTFOLDER ?? /\/[^/]+$
           { tail=$MATCH }
   
           TRAP="mv $LASTFOLDER $destdir/cur/$tail:2,S"
           HOST
    }

My understanding of this is that it places the mail directly into the 
maildir but keeps going through the rest of the block because of the 'c' 
flag, moves the email to cur/ and then unsets the HOST variable. I then 
assume that because HOST has been unset, it stops processing the rest of 
the rcfile.

The strange thing is that I now get two copies of each email -- one is 
'Seen' and one is not. See below for procmail log -- it appears that the 
first time it hits the unset of HOST, it starts processing the whole 
rcfile again!

    procmail: [25782] Fri Mar  2 14:02:46 2007
    procmail: Assigning "INCLUDERC=/home/vmail/tom/.procmail/rc.logcheck"
    procmail: Match on "^Subject.*(Security Alerts|Security 
Events|system check) *$"
    procmail: Extraneous locallockfile ignored
    procmail: Locking ".lock"
    procmail: Unlocking ".lock"
    procmail: Assigning "destdir=.INBOX.systems.logcheck"
    procmail: Assigning 
"LASTFOLDER=.INBOX.systems.logcheck/new/1172806366.25782_1.kuat"
    procmail: Assigning "MATCH="
    procmail: Matched "1172806366.25782_1.kuat"
    procmail: Match on "/\/[^/]+$"
    procmail: Assigning "tail=1172806366.25782_1.kuat"
    procmail: Assigning "TRAP=mv 
.INBOX.systems.logcheck/new/1172806366.25782_1.kuat 
.INBOX.systems.logcheck/cur/1172806366.25782_1.kuat:2,S"
    procmail: Assigning "HOST"
    procmail: HOST mismatched "kuat"
    procmail: Assigning 
"PATH=/home/vmail/tom/bin:/bin:/usr/bin:/usr/local/bin"
    procmail: Rcfile: "/home/vmail/tom/.procmailrc"
    procmail: Assigning "PROCMAILDIR=/home/vmail/tom/.procmail"
    procmail: Assigning "LOGFILE=/home/vmail/tom/.procmail/log"
    procmail: Opening "/home/vmail/tom/.procmail/log"
    procmail: Assigning "VERBOSE=yes"
    procmail: Assigning "INCLUDERC=/home/vmail/tom/.procmail/rc.logcheck"
    procmail: Match on "^Subject.*(Security Alerts|Security 
Events|system check) *$"
    procmail: Extraneous locallockfile ignored
    procmail: Locking ".lock"
    procmail: Unlocking ".lock"
    procmail: Assigning "destdir=.INBOX.systems.logcheck"
    procmail: Assigning 
"LASTFOLDER=.INBOX.systems.logcheck/new/1172806366.25782_3.kuat"
    procmail: Assigning "MATCH="
    procmail: Matched "1172806366.25782_3.kuat"
    procmail: Match on "/\/[^/]+$"
    procmail: Assigning "tail=1172806366.25782_3.kuat"
    procmail: Assigning "TRAP=mv 
.INBOX.systems.logcheck/new/1172806366.25782_3.kuat 
.INBOX.systems.logcheck/cur/1172806366.25782_3.kuat:2,S"
    procmail: Assigning "HOST"
    procmail: HOST mismatched "kuat"
     Subject: corellia-e0 2007-03-02 14:02 Security Events
      Folder: 
.INBOX.systems.logcheck/new/1172806366.25782_3.kuat            737285


Any ideas / suggestions / help would be appreciated.

Regards,
Tom

-- 
Tom Lanyon
Systems Administrator
NetSpot Pty Ltd
Ph: +618 8361 6800   Fax: +618 8361 6811


____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>
  • No abort after unsetting HOST?, Tom Lanyon <=