On Mon, May 23 2016, notmuch@gaenseri.ch wrote: > [ Unknown signature status ] > 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? Put learn_ham/ & learn_spam/ outside of the path notmuch looks for mail files. now notmuch *should* notice renames for your spam/inbox folders (but please keep sending mails if this is not the case) Instead of copying you could try hard/symlinking, but then dspam may modify the files (if that matters). > Thanks for your help in advance, Julius