Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id BCD346DE01F7 for ; Mon, 23 May 2016 09:34:35 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.59 X-Spam-Level: X-Spam-Status: No, score=0.59 tagged_above=-999 required=5 tests=[AWL=-0.062, SPF_NEUTRAL=0.652] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KPfgDZUpTpYD for ; Mon, 23 May 2016 09:34:27 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 0A4E86DE00C6 for ; Mon, 23 May 2016 09:34:26 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 81229100090; Mon, 23 May 2016 19:34:22 +0300 (EEST) From: Tomi Ollila To: notmuch@gaenseri.ch, notmuch@notmuchmail.org Subject: Re: Macros for notmuch and bayesian spam learner (dspam) In-Reply-To: <20160523125809.46tj3fumzrvje763@thinkpad> References: <20160523125809.46tj3fumzrvje763@thinkpad> User-Agent: Notmuch/0.22+26~g2adc7d1 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2016 16:34:35 -0000 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 "=learn_spam=spam+spam\n" > > #mark falsely classified spam message as ham -> copy message to "learn_ham" and move it to the real folder "inbox" > macro index,pager \Ch "=learn_ham\n=INBOX -spam +inbox\n" > > #archive message - copy message to learn_ham > macro index,pager \Ca "=learn_ham-inbox +archive\n" > > 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