procmail
[Top] [All Lists]

Re: Invoking a program via procmail isn't working.

2005-08-22 14:27:36
Am 2005-08-22 12:10:40, schrieb Bruce Johnson:
I'm trying to process messages sent to an account, two parts we want  
to keep the whole message, as well as parse the body of a message for  
certain lines and do stuff based on that:

PMDIR=$HOME
MAILDIR=$HOME/mail   # all mailboxes are in mail/
LOGFILE=$PMDIR/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "

:0
               * ^TO.*
                    ^^
        The procmail macro should be "* TO_.*"
        or the normal "* ^ To:.*"

               {
                  :0 c

        Why do you copy the message ?
        You need to do filter and ignore the Warnings.

                    :0 fw
                    | perl $HOME/procvir.pl >> procvir.log
                        ^^^^
        Maybe you should use the full path.

                  :0
                  mbox
                 }

a log file entry looks like:

--- Logging /home/virusalert/procmail.log for virusalert, From  
virusalert(_at_)pharmacy(_dot_)arizona(_dot_)edu  Mon Aug 22 11:57:03 2005
Subject: VIRUS (W32/Netsky-P) FROM 
<?(_at_)Hayes(_dot_)Pharmacology(_dot_)Arizona(_dot_)EDU>
   Folder:  
mbox                                                             2440

So I know procmail is, in fact catching the messages and filing them.

Better if you set a "VERBOSE=on" before the first ":0"
and the after the closing "}" a "VERBOSE=off"

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature

____________________________________________________________
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