"Datona Communications" wrote:
Does anyone out there know of a website which has example on how to =
configure procmail?
http://www.procmail.org/jari/pm-tips.html
http://www.uwasa.fi/~ts/info/proctips.html
I am actually looking for an example which will =
show me how to pull a variable from an email and pass it off to a perl =
script or add the variable to a text file. The example variable would =
be in the body of the email and would be something like:
bla bla bla: 123456
:0bi
* some conditions here
BLABLA=| sed -n -e '/^bla bla bla/s/^[^:]*: *//p'
And now a few questions:
What if multiple lines meet the criteria?
The above assumes there's just one, or that you don't mind
having a variable that contains newlines.
Is the entire rest of the line to be treated as the value?
The above assumes 'yes'.
Can the 123456 part contain ':' characters?
The above assumes that it might.
It would look for that line in the email and take the "123456" and pass =
that off to a script or a text file.
http://www.procmail.org/jari/pm-tips-body.html#quoting_passing_values_to_an
If you want to pass it to a text file...
:0 cb:
* some conditions here
| sed -n -e '/^bla bla bla/s/^[^:]*://p' >> /path/to/file
--
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information. Sorry.
Collin Park Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail