* 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
* Re: Imap splitting success
2013-07-16 6:54 Imap splitting success Eric Abrahamsen
@ 2013-07-22 8:16 ` Eric Abrahamsen
0 siblings, 0 replies; 2+ messages in thread
From: Eric Abrahamsen @ 2013-07-22 8:16 UTC (permalink / raw)
To: ding
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> 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")))
>
I know everyone already knows this, but another key piece of the puzzle
is:
(setq nnmail-mail-splitting-decodes t)
This ensures that your splits are matched against decoded header values,
as you see them in the *Article* buffer, not as they actually exist
encoded on file. This is particularly important in the case of gmail,
which munges any header with non-ASCII characters. With the above
variable set to `t', your splits match against:
Subject: Try our new Ultra-腥™ Lutefisk [lʉːtfesk] substitute!
Instead of:
Subject: Try our new =?utf-8?B?VWx0cmEt6IWl4oSi?= Lutefisk =?utf-8?B?W2w=?=
=?utf-8?B?yonLkHRmZXNrXQ==?= substitute!
Onward,
E
^ 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).