At 09:38 2010-12-20, Richard Reina wrote:
I got it too work. Needed the full path to ssmtp.
Now, if I can just figure out how to pass the subject to a perl
script so it can be test against valid POs in a database.
I can't help but think you should sit down and write out everything
you need this script to do, and just ask someone here to finish
writing it for you...
# this will extract the subject (removing leading whitespace, though you
# could easily deal with that within your perl script)
SUBJECT=""
:0
* ^Subject:[ ]*\/[^ ].*
{
SUBJECT=$MATCH
}
# this will pass the subject to your perl script, using the return value
# to determine if the procmail recipe should take some further action.
:0
* ? /path/to/some/script.pl "$SUBJECT"
{
# do something (such as sending your "there's no PO number" notice)
}
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
____________________________________________________________
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