How can I make bogofilter update the X-Bogosity header from Unsure to Ham?

0

I have a mutt macro that classifies mail as either Spam (F9) or Ham (F10) by running it through bogofilter.

However, I would like the X-Bogosity header to be updated when I do this, rather than having the email still say "Unsure".

Does anyone know how I can achieve this? I feel like it's something that should be relatively easy.

g33kz0r

Posted 2012-09-20T17:35:45.003

Reputation: 284

Answers

0

Temporary workaround: disable Unsure mode, as explained here: http://bogofilter.sourceforge.net/faq.shtml#unsure

This means it's not necessary to update the header from Unsure to {Spam, Ham}, as the Unsure header never occurs in the first place.

g33kz0r

Posted 2012-09-20T17:35:45.003

Reputation: 284

0

You could use grep -v to strip the existing X-Bogosity line out of the message prior to re-processing.

Then you could add the newly updated header afterwards by running it through bogofilter -p -e again after you've trained on it. Note that due to the nature of statistical spam filters the new header may still not be what you trained it as.

Note that bogofilter itself ignores any pre-existing X-Bogosity header when classifying and learning, so you shouldn't normally need to strip headers out anyway. It may be a better idea just not to worry about the headers that end up on the mail and use the folder that they're in to categorise them instead.

thomasrutter

Posted 2012-09-20T17:35:45.003

Reputation: 1 473