On Tue Feb 02 2016 09:36:12 Martin Gregorie <mar...@gregorie.org> said: > > On Tue, 2016-02-02 at 09:10 -0700, @lbutlr wrote: >> When a user moves a message from the spam box to the not spam box i >> have a script that learns that message as ham, however, the user >> would like it if the tagging of the message was removed in the >> process. >> > I do something similar when I add spam to my spam corpus. I use this > gawk script to do the job: > > gawk ' > BEGIN { act = "copy"; > body = "no"; > } > /^[A-Za-z]/ { act = "copy" } > /^X-Spam/ { act = "skip" } > /^$/ { body = "yes"; } > { > if (act == "copy" || body == "yes") > { print } > } > ' <$1 >temp.txt > > It is driven by a bash script that accepts the names or one or more > message files as its arguments and runs each message through gawk. > > To use it, I first copy the message(s) into my spam collection > directory and then run this script, which replaces each named spam > message with a version that has been stripped of its X-Spam headers. > > I've omitted the enclosing bash script because you'll probably want > something quite different, but hopefully the gawk script will be > useful.
That’s interesting, but what the user means by “spam tagging” is the subject tagging and the message attachment (though I have disabled that due to overwhelming complaints, though it is the easiest to ‘repair” as they can just drag the original message out and add it to their no-spam box, users can’t seem to manage that. They don’t care (or even know) about mail headers. -- 'I cannot! He has been kindness itself to me!' 'And you can be Death itself to him.'