From 8c856d17609ae8d2213341cff79898b82dc75f9b Mon Sep 17 00:00:00 2001 From: notmuch Date: Mon, 23 May 2016 14:58:09 +0200 Subject: [PATCH] Macros for notmuch and bayesian spam learner (dspam) --- 56/5fa6ea65d6bb16bb272dd797e095a6582138cf | 93 +++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 56/5fa6ea65d6bb16bb272dd797e095a6582138cf diff --git a/56/5fa6ea65d6bb16bb272dd797e095a6582138cf b/56/5fa6ea65d6bb16bb272dd797e095a6582138cf new file mode 100644 index 000000000..6e78e5537 --- /dev/null +++ b/56/5fa6ea65d6bb16bb272dd797e095a6582138cf @@ -0,0 +1,93 @@ +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 393536DE0130 + for ; Mon, 23 May 2016 06:05:01 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 h2vY3MN2RIHt for ; + Mon, 23 May 2016 06:04:53 -0700 (PDT) +X-Greylist: delayed 398 seconds by postgrey-1.35 at arlo; + Mon, 23 May 2016 06:04:52 PDT +Received: from grus.uberspace.de (grus.uberspace.de [95.143.172.223]) + by arlo.cworth.org (Postfix) with ESMTPS id 7D6236DE00F5 + for ; Mon, 23 May 2016 06:04:52 -0700 (PDT) +Received: (qmail 16894 invoked from network); 23 May 2016 12:58:08 -0000 +Received: from localhost (HELO localhost) (127.0.0.1) + by grus.uberspace.de with SMTP; 23 May 2016 12:58:08 -0000 +Date: Mon, 23 May 2016 14:58:09 +0200 +From: notmuch@gaenseri.ch +To: notmuch@notmuchmail.org +Subject: Macros for notmuch and bayesian spam learner (dspam) +Message-ID: <20160523125809.46tj3fumzrvje763@thinkpad> +MIME-Version: 1.0 +Content-Type: multipart/signed; micalg=pgp-sha512; + protocol="application/pgp-signature"; boundary="imdopag7n2mkjuj4" +Content-Disposition: inline +User-Agent: Mutt/1.6.1-neo () +X-Mailman-Approved-At: Mon, 23 May 2016 07:46:35 -0700 +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 13:05:01 -0000 + + +--imdopag7n2mkjuj4 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +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? +Thanks for your help in advance, Julius + +--imdopag7n2mkjuj4 +Content-Type: application/pgp-signature; name="signature.asc" + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAEBCgAGBQJXQv5hAAoJELGkVMZgFbJ+WsEQAJuad4dEPvf4NZygPJ7LCNoD +4Sg3OhtaMRyZ0QgayIyrW8bjVZyWEMc16UifJBWi6pr2Hwzfm/SzVs8yZd7Hqvz4 +NAkwf9QVc7H3o6BGS7HF7u0eUdgSKils2DbOfioEE+COpMOWrI5hjgyRV14N2QEz +vun2I8ihj4lZ1tQnPw3plueef72ZQDrNwAqvLkRfEPabZUDyjqNuDVfNmkDyNfcO +L0H0hkwik7cZpHIC9U/WMbFs2AdwvtmBqhaKTpuOaskVV6z+mLbOSUxlECXbd+wY +we/mPMs36n5JdzMiaoLvzUYhNOKg0fkXr1y1an2dB3iFvbbY5Zi3Gx9YVZonL0tM +WZ+ZOnfeZ/aHC8Pxo0R7PV3ANSPBmqsj9/Ebu8zEEyVlDDCjYo6dR1HL2PYwgr79 +o8JtU/9nrkn1jSYOhPEdgoTaVS3saIwtEY+64QZfcdAz7zvz5QCUaqzkeaNFD2cp +oft9ANeH+I+QDc8y/Mwt//ehReSxh+J6kIk2lLXo0Chren5H93jyl/EFQAORRYYU +jsfOoyPWb3lrxwtDYVE/lIBTtgePhvN2aasxactTsUKLyWAYWI6NAnA3oPRDNQat +Mxsc5pFQ8dNScL4lvolug8YTGpo65YVEQ/YCQ7+xm/bLB/+NCJIR9bMP3uRvitzz +K591lXSbDSQ9ZggFuKNh +=vqlh +-----END PGP SIGNATURE----- + +--imdopag7n2mkjuj4-- -- 2.26.2