yeah I have a method of correcting bayes whereby I will send myself
the message id of the message and it will then use that using IMAP to
fetch the message and then relearn it using SA's API's at the perl
level but I'm just looking for something that can actually strip the
headers of the message. When you relearn you don't actually need to
touch the contents of the actual message but I have rules on the
client that colorize SPAM so I also want the original headers to be
removed. Preferably without needing to run a script knowing the
actual filename itself. I suppose I could write something that hunted
down the message by message Id and then stripped out the headers and
rewrite the file but I was hoping for a more elegant solution than that.
On Jul 30, 2006, at 5:08 PM, mouss wrote:
Robert Nicholson wrote:
The issue for me is that I need to strip out the SA headers from
the message after it's tagged as SPAM. But the problem is always
that you cannot get the physical filename from the actual contents
of the message itself.
Use a special folder for false positives
(.Filter.Error, .Junk.Error or whatever), then you don't care for
filenames...
now, you have two choices:
1- mv all FPs from the FP folder to an intermediary directory
2- run sa-learn on the intermediary directory
3- modify the headers in each file in the intermediary directory
(formail/reformail may help)
4- redeliver the modified files (maildrop/procmail)
After step 2, you may optionally rerun spamassassin -t (or
spamc...) to check if SA will still tag the message as spam or not,
and if it's still an FP, you may want to log the rules that are
triggered so that you change them if they catch many FPs on your
site. This however requires more work than it may appear.