I think I need another set of eyes. I have not found the solution in the
archives, but I'm not sure what I am doing wrong so I do not know what to
search for.
I want particular messages to go to a particular folder -- thats what
procmail does. There are three cases to be met: the sender, the subject
line, and a keyword in the body of the message. The sender and the
subject are being caught just fine. But I have been unable to get the
keyword in the body recognized. I have tried searching on a longer
string, I have added .* wildcards on either side of the keyword, but it is
never caught. If anyone has any suggestions I would be most grateful. I
have included below the rule, the email, and the procmail log
corresponding to that email.
Christopher L. Barnard
Senior Unix System Administrator Rush Univ Medical Center
cbarnard(_at_)rush(_dot_)edu 1-312-942-9649
The rule:
:0:
* ^To:(_dot_)root(_at_)dmznb-b(_dot_)dmzbbus(_dot_)rpslmc(_dot_)edu
* ^Subject:.Backup
* succeeded
/opt/home/cbarnard/mail/backups
A typical email that it should send to my backups email folder:
-----------------------------------------
Date: Thu, 26 Jun 2008 22:30:42 -0500 (CDT)
From: root on Dmznb <root(_at_)dmznb-b(_dot_)dmzbbus(_dot_)rpslmc(_dot_)edu>
To: root(_at_)dmznb-b(_dot_)dmzbbus(_dot_)rpslmc(_dot_)edu
Subject: Backup
Backup on client webct-b for user root by server dmznb-b succeeded.
Policy = dmz
Schedule = dinc
File list
---------
ALL_LOCAL_DRIVES
---------------------------------------------
The logfile for this email:
procmail: Assigning "INCLUDERC=/opt/home/cbarnard/.procmail/rc.maillists"
procmail: Assigning "VERBOSE=on"
procmail: No match on "^Subject:.*out of the office"
procmail: No match on "^Subject:.*out of office"
procmail: No match on "^From:.Mail Delivery Subsystem"
procmail: No match on "^From:.Account for DNS"
procmail: Match on
"^To:(_dot_)root(_at_)dmznb-b(_dot_)dmzbbus(_dot_)rpslmc(_dot_)edu"
procmail: Match on "^Subject:.Backup"
procmail: No match on "succeeded"
procmail: No match on "^Subject:.NetBackup backup started"
procmail: No match on "^From:(_dot_)Help(_at_)rush(_dot_)edu"
procmail: No match on "^Subject:.[Rr]e:"
procmail: Executing " formail -xFrom: | /usr/bin/fgrep -i -f
/opt/home/cbarnard/
.procmail/greenlist.dat"
procmail: Match on " formail -xFrom: | /usr/bin/fgrep -i -f
/opt/home/cbarnard/.
procmail/greenlist.dat"
procmail: Assigning "KEEPER=yes"
procmail: No match on "^To:(_dot_)*sunmanagers(_at_)sunmanagers\(_dot_)org"
procmail: No match on ! "^^yes^^"
procmail: Bypassed locking "/var/mail/cbarnard.lock"
procmail: Assigning "LASTFOLDER=/var/mail/cbarnard"
procmail: Opening "/var/mail/cbarnard"
procmail: Acquiring kernel-lock
procmail: [20524] Thu Jun 26 22:31:10 2008
procmail: Notified comsat: "cbarnard(_at_)31523:/var/mail/cbarnard"
From root(_at_)dmznb-b(_dot_)dmzbbus(_dot_)rpslmc(_dot_)edu Thu Jun 26
22:30:56 2008
Subject: Backup
Folder: /var/mail/cbarnard
____________________________________________________________
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