procmail
[Top] [All Lists]

Re: Capturing from address and running a program

2006-10-30 13:26:46
On 10/25/06, Poohba <poohba(_at_)blkpoohba(_dot_)dyndns(_dot_)org> wrote:
I need to get the from address and use it in a program.  I have a script
that I want to run depending on the subject.  I am going to send out an
email and the replies will run a program and the program is suppose to
send an email back to them but I need to get the email address to do
this.  Also.  Does procmail allow you to run a command with arguments?
ie:

:0:
* ^Subject.*this is a test for this program
|/path/to/this/program/for senders_email_address

So how do I get the email address and would that work?  The program will
take that argument and plug it in as the recipient.

Try something like this (not 100% sure on the regex):

:0:
* ^From:.*\/[0-9a-z(_dot_)_-]+(_at_)[0-9a-z(_dot_)_-]+\(_dot_)[a-z]+
* ^Subject.*this is a test for this program
|/path/to/this/program/for "$MATCH"

-- 
-- Matt Dunford -- zenmatic(_at_)gmail(_dot_)com

____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>