Date: Fri, 01 Apr 2011 09:53:51 -0300
From: Marcio_Luciano_Donada <mdonada(_at_)auroraalimentos(_dot_)com(_dot_)br>
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
Subject: Help rule
I would help of experts in a procmail. I want to get a message that it
has the header X-Amavis-Alert and change the subject of it, is this
possible? My idea would be:
:0:
* ^X-Amavis-Alert:BAD HEADER,
$MAILDIR/Maildir/.Spam/
My question is how to change the subject of the message
Procmail, itself, doesn't do that. You have to pipe the messge through
a 'filter' that makes the changee. e.g.:
:0 fhw
* ^X-Amavis-Alert:BAD HEADER,
| sed -e "/^Subject: /& {{added text}} /I"
:0 A
$MAILDIR/Maildir/.Spam/
This will change
"Subject: Some Text"
to
"Subject: {{added text}} Some Text"
and do not know
if he'll understand BAD HEADER (it has a space in it).
Yes, procmail _does_ understand regex patterns that have whitespace in
them _most_ of the time. Trailing whitespace characters ares tripped,
So if you want a space as the *last* thing in a pattern, you have to use
something like "some text[ ]" instead of "some text ".
____________________________________________________________
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