Am 02.02.2016 um 17:33 schrieb @lbutlr:
On 02 Feb 2016, at 09:19, Jari Fredriksson <ja...@iki.fi> wrote:@lbutlr kirjoitti 2.2.2016 18:10: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. spamassassin -d doesn’t seem the right tool since I think I need to write the unmarked-up message to a new file? Seems like a pretty basic thing that most mail systems would want to do, but my google-foo has failed to find the answer.Just do it with a script that first writes to a temporary file and then moves that to the original, if the write did not return any errors?Yeah, I just hate to duplicate effort (especially since my ‘duplication’ will likely be inferior to something someone else has done. Also, it means looking at every message individually, where my current script simply processes the maildir
with a combination of "find" and "formail" (part of procmail) it's no problem to strip specific headers from mail-files
combine that with the fact that find can search for mtime/ctime/atime and so you only need to pass a limited amount of mails to through your script
frankly you should to the same with the learning script instead pass the whole dir except "from-scratch-rebuilds" of the bayes, samples older than 24 hours are not considered here for traing/anonymize/header-strip tasks and that's why it's no problem to have 60000 samples in one folder
signature.asc
Description: OpenPGP digital signature