procmail question

2015-08-28 Thread Matt Birkholz
> From: Sean Roe 
> Date: Wed, 26 Aug 2015 16:34:11 -0700
> 
> 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;

Did you see the example in the procmailex manpage that uses \/ and
MATCH?  Its description:

Now follows an example for a very simple fileserver accessible by
mail.  For more demanding applications, I suggest you take a look
at SmartList (available from the same place as the procmail
distribution).  As listed, this fileserver sends back at most one
file per request, it ignores the body of incoming mails, the
Subject: line has to look like "Subject: send file
the_file_you_want" (the blanks are significant),

In your case, I think you want "EGR=|formail..." for starters.
---
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss


procmail question

2015-08-26 Thread Sean Roe
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 bipublisher-notificat...@oracle.com
{
EGR = `formail -xSubject: | /bin/sed -e 's/([A-Z]{2,3}\d{2}|PROD)//g'`
/tmp/bi_pub_"$EGR"
}
:0
* ^FROM bipublisher-rep...@oracle.com
/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 - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss