procmail question

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Sean Roe
Date:  
To: Main PLUG discussion list
Subject: procmail question
Hi All,

Im trying to dig up some ancient procmail knowledge and I cant seem to find
it. All I want to do is take a email look at the subject line extract out
a variable and use that variable to send the email to an file based on that
name to be processed later;
Example:

recipe:
LOGFILE=$HOME/.procmailrc.log
MAILDIR=$HOME/Mail
VERBOSE=yes
PATH=/usr/bin

:0:
* ^FROM
{
EGR = `formail -xSubject: | /bin/sed -e 's/([A-Z]{2,3}\d{2}|PROD)//g'`
/tmp/bi_pub_"$EGR"
}
:0
* ^FROM
/dev/null


the string in the subject line:

Oracle BI Publisher Notification: [DEV01]: Job was successfully processed.

so sed looks for 2 or 3 capital letters 2 numbers or the word PROD. and Im
trying to write out to /tmp/bi_pub_DEV01 or whatever the value from the EGR
variable.

Any guidance would be helpful. The online resources seem a little obtuse.

Sean
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss