Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.