At 12:47 2003-08-18 -0500, Chris Barnes wrote:
I am running SA on my own box. SA is configured with
subject_tag [SPAM]
You do realize that the SA folks probably can't really help you with this,
so why crosspost the message (where people on either list CANNOT crosspost
their replies unless they too are subscribed to BOTH lists). This reply is
addressed only to the procmail list, because I don't plan on dealing with
the bounce from the SA list - of course, the folks on the SA list will be
blissfully unaware that the question has been answered, and someone else
will no doubt expend their time to communicate the same answer.
My Question:
What would the procmail script look like that would look at the subject
line and strip out the *****SPAM***** if it exists? My idea is to put
this into the /etc/procmailrc file (which currently looks like:
Pretty much like any other filter which removes a subject tag. This has
been covered on the procmail list about 1284 times, and IS in the archives
- the many threads on "how do I add/remove [listname] tags from the
subject" operate on the very same principle - regexp for a static string
and store the REST of the subject line in $MATCH, then feed that to formail.
#
# rule to remove SpamAssassin subject tagging
# (assuming FIRST GENERATION ONLY, not replies to messages which already
# contained the tag)
#
# Note: I do not use SA, so this should be tested against a spool of
# actual SA-tagged messages and adjusted accordingly.
#
# define what the inserted subject tag is
SATAG="*****SPAM*****"
:0fhw
* $ ^Subject:[ ]*$\SATAG\/.*
| formail -I "Subject: $MATCH"
Alternately. you could use something like the following as the action line
for the above recipe, which would at least retain the subject line in the
same position within the headers (formail will remove it, then tack it on
the end of the headers):
| sed -e 's/\*\*\*\*\*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(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail