match and export subject line and from header with procmail
- by Nick
I would like to use procmail or a combination of procmail and formail to take an email message and match a specific keyword in the Subject: line/header, and if matched, export the contents of the Subject: line/header, and the contents of the From: line/header to a perl script.
I have researched this, and have not been able to get this working all the way. I am new to procmail, and I assume I need to use a nesting block, but I am not sure how to get the data and then export it. I have been able to match the subject line and export it to a perl script where it is read via ARGV0, but get lost when trying to export and match multiple fields.
I tried subscribing to the procmail listserv, but it appears to be broken.
Can someone help me with this, please?