From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83529 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Imap splitting success Date: Tue, 16 Jul 2013 14:54:50 +0800 Message-ID: <87ppujc7ut.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373957779 9115 80.91.229.3 (16 Jul 2013 06:56:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Jul 2013 06:56:19 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M31787@lists.math.uh.edu Tue Jul 16 08:56:18 2013 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UyzBH-0005xL-Ms for ding-account@gmane.org; Tue, 16 Jul 2013 08:56:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Uyz9j-0005Fa-6U; Tue, 16 Jul 2013 01:54:39 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Uyz9h-0005FN-6V for ding@lists.math.uh.edu; Tue, 16 Jul 2013 01:54:37 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Uyz9f-00085E-TU for ding@lists.math.uh.edu; Tue, 16 Jul 2013 01:54:37 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Uyz9d-0006SG-To for ding@gnus.org; Tue, 16 Jul 2013 08:54:33 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uyz9a-000575-Kz for ding@gnus.org; Tue, 16 Jul 2013 08:54:30 +0200 Original-Received: from 114.250.130.162 ([114.250.130.162]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Jul 2013 08:54:30 +0200 Original-Received: from eric by 114.250.130.162 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Jul 2013 08:54:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 114.250.130.162 User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:hlx5b4BYbbbbc9ZOZIFRQwnfyd0= X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin (3.3.1 2010-03-16) analysis follows Bayesian score: 0.0000 Ham tokens: 0.000-2301--14110h-0s--0d--H*u:Emacs, 0.000-717--4398h-0s--0d--H*u:Gnus, 0.000-674--4134h-0s--0d--H*UA:linux, 0.000-674--4133h-0s--0d--H*u:linux, 0.000-664--4069h-0s--0d--H*UA:gnu Spam tokens: 0.989-8577--554h-44921s--0d--HTo:D*gnus.org, 0.989-8952--581h-46895s--0d--HX-Spam-Relays-External:quimby.gnus.org, 0.989-8952--581h-46895s--0d--H*RU:quimby.gnus.org, 0.986-8798--735h-46897s--0d--HX-Spam-Relays-Internal:quimby.gnus.org, 0.986-8798--735h-46897s--0d--H*RT:80.91.231.51 Autolearn status: no -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.91.229.3 listed in list.dnswl.org] 2.4 FSL_HELO_BARE_IP_2 FSL_HELO_BARE_IP_2 1.2 RCVD_NUMERIC_HELO Received: contains an IP address used for HELO -0.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83529 Archived-At: Okay, I've finally got everything working right, and wanted to lay out my imap splitting setup here for posterity. It was a pain in the butt to wrap my head around, and I assume other people may have similar difficulties. It ends up looking pretty simple, though, so maybe I really am the only one. The main headache was BBDB integration. In the normal nnmail setup, BBDB intercepts all splitting, and calls nnmail-split-fancy if it can't find its own match. That works because nnmail-split-fancy is both a variable and a function. For nnimap, nnimap-split-fancy is only a variable. Thus the BBDB integration process is reversed: splitting goes straight to nnimap-split-fancy, and bbdb/gnus-nnimap-folder-list-from-bbdb dumps splits directly into it. That took a while to figure out. So the basic arrangement: "imap" fields are added to BBDB records you want to create splits from. to-list/to-address/split-regexp parameters are added to groups you want to automatically split to. Then: (setq gnus-secondary-select-methods '((nnimap "acc" (nnimap-inbox "INBOX") (nnimap-split-methods nnimap-split-fancy)) (setq nnimap-split-fancy `(| ,@(bbdb/gnus-nnimap-folder-list-from-bbdb) ;; other splits here (: gnus-group-split-fancy nil t "INBOX"))) Not so hard after all! Eric