* Trouble with extra headers
@ 2014-02-08 21:30 N. Jackson
2014-03-05 13:32 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: N. Jackson @ 2014-02-08 21:30 UTC (permalink / raw)
To: info-gnus-english
I'm trying to use gnus-extra-headers and I don't seem to quite have the
trick of it.
I have a header "Delivered-To" on my local IMAP server which identifies
which mail server a message was retrieved from. I want eventually to use
the value of this header in Gnus select methods to chose my "From"
header and outbound smtp server for replies.
As an initial test, I wanted to try limiting my Group Summary buffer
using the value of this header, and I wanted to try displaying the value
of it in my summary line.
I added
(setq gnus-extra-headers '(To Newsgroups Delivered-To))
to my .gnus.el file. (Eventually I would have this in the group
parameters for my local IMAP server, but it seemed simplest to add it
globally at first.)
Then, in my Summary buffer I try to use the /x command to limit by an
extra header. This prompts me for the header to limit by:
Limit extra header (default To):
and I can choose "Delivered-To" using tab completion, so clearly the
change to gnus-extra-headers "took" at some level. (Previously
"Delivered-To" wasn't accepted here.) But then at the subsequent prompt
Limit to header Delivered-To (regexp):
whatever I enter seems to result in no matches. For example if I simply
enter the leter "a", the response is "Found no matches for
"a"". Although I would think this should match for example at least all
my accounts on gmail as "gmail" has an "a" in it.
I checked the headers of a few emails in the group by opening them and
using C-u g to show all headers, and the "Delivered-To" header is there
and contains nothing unexpected. For example, here is one:
Delivered-To: nljlistbox2@gmail.com
I thought I might have a regular expression problem, but when I do the
same thing with the "To" header, I get my Summary buffer "limited" as
expected.
What could I be missing?
I also tried to add the value of the Delivered-To header to my summary
line. I changed
(setq gnus-summary-line-format "%U%R%z%I%(%[%4L:%&user-date;
%-23,23f%]%) %s\n")
to
(setq gnus-summary-line-format "%U%R%z%I%(%[%4L:%&user-date;%~(form
(gnus-extra-header 'Delivered-To))@ %-23,23f%]%) %s\n")
but it makes no difference (or possibly adds a space or two).
Does this suggest that Gnus is not reading/saving the values of the
"Delivered-To" header when it retrieves the headers for my mail, and
only retrieves the value when I open the mail?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Trouble with extra headers
2014-02-08 21:30 Trouble with extra headers N. Jackson
@ 2014-03-05 13:32 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2014-03-05 13:32 UTC (permalink / raw)
To: info-gnus-english
nljlistbox2@gmail.com (N. Jackson) writes:
> I added
>
> (setq gnus-extra-headers '(To Newsgroups Delivered-To))
>
> to my .gnus.el file. (Eventually I would have this in the group
> parameters for my local IMAP server, but it seemed simplest to add it
> globally at first.)
You have to tell nnimap, too, that it should be fetching these extra
headers. Add Delivered-To to `nnmail-extra-headers'.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-05 13:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-08 21:30 Trouble with extra headers N. Jackson
2014-03-05 13:32 ` Lars Ingebrigtsen
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).