Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

Temporary workaround: disable Unsure mode, as explained here:

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .