On Fri, 26 Sep 2003, Simon Byrnand wrote:

> If you're using procmail anyway, why not use FormMail to strip SpamAssassin 
> headers ? Apart from the Subject if you have subject rewriting enabled, 
> SpamAssasin doesn't change any headers, it just adds specific new headers. 
> I'd bet anything that FormMail would be lower overhead at stripping headers 
> than SpamAssassin's markup removing mode. (C vs Perl)

I thought about dropping the SA -d call and using sed.  Formail would work
too.  I end up using both to strip eroneous headers and munge sensitive
details anyways.  I call SA from MIMEDefang so SA never actually alters
the body of the message or the subject.  However I do conditionally
prepend ***SPAM*** to the subject if the score is >= 10 with MIMEDefang.  
I'm stripping that off with sed at the moment.

> That only leaves the header change to figure out....(perhaps sed, or you 
> could use procmails $MATCH builtin to extract the subject minus the 
> spamassassin change, and use the same invocation of formmail thats 
> stripping other headers to "replace" the Subject header with the new one...

I've got the subject change taken care of already.  

# Extract subject and assign it to SUBJECT
:0
* ^Subject:[    ]*\/[^  ].*
{
        SUBJECT=$MATCH
}
SUBJECT = "`echo $SUBJECT | sed -e 's/\*\*\*SPAM\*\*\* //g' \


More sed stuff happens after that.  That part works ok and doesn't seem to 
consume much in the way of resources.

If I eliminate the SA -d call then that leaves me with only one other 
CPU-draining call:  SA -r

# Report to Pyzor
:0 Wc
| /usr/bin/pyzor report
        
# Report to Razor
:0 Wc
| spamassassin -r

Now one thing I never thought about till just now is if my Pyzor call is 
redundant.  See I don't call Pyzor from SA at all in normal mail 
processing.  I only call Razor.  I assume that that SA -r only calls what 
I have configured SA to use normally, correct?  I need to look into that.

That call is very CPU intensive for some reason.  You wouldn't think that 
simply reporting a message to Razor would be that intensive but it is.

Any ideas for how to make this call less painful?

Thanks
 Justin



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to