From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: Imap splitting success
Date: Mon, 22 Jul 2013 16:16:43 +0800 [thread overview]
Message-ID: <87li4zuhzo.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87ppujc7ut.fsf@ericabrahamsen.net>
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
prev parent reply other threads:[~2013-07-22 8:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 6:54 Eric Abrahamsen
2013-07-22 8:16 ` Eric Abrahamsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87li4zuhzo.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).