Macros for notmuch and bayesian spam learner (dspam)

notmuch at gaenseri.ch notmuch at gaenseri.ch
Mon May 23 05:58:09 PDT 2016


Hey,
I'm using notmuch with mutt-kz. I'm running dspam (a bayesian spam classifier), so I've got an imap folder called "learn_spam" and a folder called "learn_ham" (for training dspam). Both folders are periodically emptied by dspam. I want to define three macros that are achieving the following results:

#mark message as spam -> copy message to "learn_spam" and move it to the real folder "spam"
macro index,pager \Cs "<copy-message>=learn_spam<enter><enter><save-message>=spam<enter><enter><modify-labels>+spam\n<sync-mailbox>"

#mark falsely classified spam message as ham -> copy message to "learn_ham" and move it to the real folder "inbox"
macro index,pager \Ch "<copy-message>=learn_ham\n<save-message>=INBOX <modify-labels>-spam +inbox\n<sync-mailbox>"

#archive message - copy message to learn_ham
macro index,pager \Ca "<copy-message>=learn_ham<enter><enter><modify-labels>-inbox +archive\n<sync-mailbox>"

There is only one big problem: after I've copied the mail to the two learn folders and after they are being deleted (after processing) from dspam they are kind of non-existing for dspam. So I only want to copy the message to the learning folders, but after they are being extenally deleted from these folders notmuch thinks that they are away and is apparently not able to detect that there is still one copy of these messages present.

Do you know how to fix that?
Thanks for your help in advance, Julius
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20160523/815a648d/attachment.sig>


More information about the notmuch mailing list