At 08:37 2011-04-01, Robert Bonomi wrote:
Procmail, itself, doesn't do that. You have to pipe the messge through
a 'filter' that makes the changee. e.g.:
Formail is a tool which is part of the procmail distribution. Header
rewriting is a big part of what it is used for.
# grab subject. Best to not incorporated this into the same recipe as your
# header rewrite, in case there's NO subject, which would result in the
# filter condition NOT executing.
# As written, this eliminates leading whitespaces.
:0
* Subject:[ ]*\/[^ ].*
{
SUBJECT=$MATCH
}
# I don't use amavis, but I suspect it may place several tags in the header,
# and there's probably whitespace before the first one, so check your regexp.
:0
* ^X-Amavis-Alert:BAD HEADER
{
:0f
| formail -I "Subject: [BAD HEADER] $SUBJECT"
# maildir wouldn't use locking flag.
:0
$MAILDIR/Maildir/.Spam/
}
---
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