Gnus development mailing list
 help / color / mirror / Atom feed
* Imap splitting success
@ 2013-07-16  6:54 Eric Abrahamsen
  2013-07-22  8:16 ` Eric Abrahamsen
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Abrahamsen @ 2013-07-16  6:54 UTC (permalink / raw)
  To: ding

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-22  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-16  6:54 Imap splitting success Eric Abrahamsen
2013-07-22  8:16 ` Eric Abrahamsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).