* nnimap splitting (yeah again)
@ 2011-03-04 10:20 Olivier Sirven
2011-03-04 14:06 ` Olivier Sirven
2011-03-05 10:14 ` Lars Magne Ingebrigtsen
0 siblings, 2 replies; 5+ messages in thread
From: Olivier Sirven @ 2011-03-04 10:20 UTC (permalink / raw)
To: ding
Hey,
I've a strange behavior with nnimap splitting.
If I define nnimap-split-methods and leave nnimap-split-fancy
untouched it splits all my incoming mails into mail.misc folder. I guess
this is because the default value of nnmail-split-fancy is "mail.misc"
Is this the wanted behavior?
And BTW, I kept reading all threads about splitting but still I can't
make my splitting rules to be taken into account. Mails are just stuck
into the INBOX folder, I just don't understand why.
Here is the relevant parts of my gnus.el:
--8<---------------cut here---------------start------------->8---
(setq nnmail-split-fancy nil)
(setq nnmail-split-methods
'(("INBOX.example" "^Subject: My Example")))
(setq gnus-secondary-select-methods
'((nnimap "MyImapServer"
(nnimap-address "mail.example.com")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.gpg")
(nnimap-expunge t)
(nnimap-inbox "INBOX")
(nnimap-split-crosspost nil)
(nnimap-split-download-body nil)
(nnimap-split-methods nnmail-split-methods)
(nnimap-split-fancy nil)
)))
--8<---------------cut here---------------end--------------->8---
Thanks
--
Olivier
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nnimap splitting (yeah again)
2011-03-04 10:20 nnimap splitting (yeah again) Olivier Sirven
@ 2011-03-04 14:06 ` Olivier Sirven
2011-03-05 10:14 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 5+ messages in thread
From: Olivier Sirven @ 2011-03-04 14:06 UTC (permalink / raw)
To: ding
I've tried to switch to nnimap-split-fancy too but I still get no
splitting.
Here is the relevant part I defined:
--8<---------------cut here---------------start------------->8---
(nnimap "ExampleMails"
(nnimap-address "mail.example.com")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.gpg")
(nnimap-expunge t)
(nnimap-inbox "INBOX")
(nnimap-split-fancy
'(|
("from" "\\(toto\\|tutu\\)@example.com"
(|
("subject" "test" "INBOX.test")
("subject" "bla" "INBOX.bla")
))
;; default destination group for unclassified mails,
;; don't leave them in INBOX
"INBOX.unknown"
)))
--8<---------------cut here---------------end--------------->8---
--
Olivier
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nnimap splitting (yeah again)
2011-03-04 10:20 nnimap splitting (yeah again) Olivier Sirven
2011-03-04 14:06 ` Olivier Sirven
@ 2011-03-05 10:14 ` Lars Magne Ingebrigtsen
2011-03-05 13:39 ` Olivier Sirven
1 sibling, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-03-05 10:14 UTC (permalink / raw)
To: ding
> (setq gnus-secondary-select-methods
> '((nnimap "MyImapServer"
> (nnimap-address "mail.example.com")
> (nnimap-server-port 993)
> (nnimap-stream ssl)
> (nnimap-authinfo-file "~/.authinfo.gpg")
> (nnimap-expunge t)
These four lines are unnecessary...
> (nnimap-inbox "INBOX")
> (nnimap-split-crosspost nil)
> (nnimap-split-download-body nil)
> (nnimap-split-methods nnmail-split-methods)
But, anyway, here's the problem. It's a Lisp arcana problem. You're
setting `gnus-secondary-select-methods' to a quoted list, which means
that nothing in there is evaluated. So you're setting
`nnimap-split-methods' to the *symbol* `nnmail-split-methods'. Which
won't work. You want it to be the value of `nnmail-split-methods'
instead.
This will do the trick:
(setq gnus-secondary-select-methods
`((nnimap "MyImapServer"
(nnimap-address "mail.example.com")
(nnimap-inbox "INBOX")
(nnimap-split-methods ,nnmail-split-methods)
)))
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nnimap splitting (yeah again)
2011-03-05 10:14 ` Lars Magne Ingebrigtsen
@ 2011-03-05 13:39 ` Olivier Sirven
2011-03-07 11:23 ` Olivier Sirven
0 siblings, 1 reply; 5+ messages in thread
From: Olivier Sirven @ 2011-03-05 13:39 UTC (permalink / raw)
To: ding
On 2011-03-05 11:14:42, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
>> (setq gnus-secondary-select-methods
>> '((nnimap "MyImapServer"
>> (nnimap-address "mail.example.com")
>
>> (nnimap-server-port 993)
>> (nnimap-stream ssl)
>> (nnimap-authinfo-file "~/.authinfo.gpg")
>> (nnimap-expunge t)
>
> These four lines are unnecessary...
>
>> (nnimap-inbox "INBOX")
>> (nnimap-split-crosspost nil)
>> (nnimap-split-download-body nil)
>> (nnimap-split-methods nnmail-split-methods)
>
> But, anyway, here's the problem. It's a Lisp arcana problem. You're
> setting `gnus-secondary-select-methods' to a quoted list, which means
> that nothing in there is evaluated. So you're setting
> `nnimap-split-methods' to the *symbol* `nnmail-split-methods'. Which
> won't work. You want it to be the value of `nnmail-split-methods'
> instead.
>
> This will do the trick:
>
> (setq gnus-secondary-select-methods
> `((nnimap "MyImapServer"
> (nnimap-address "mail.example.com")
> (nnimap-inbox "INBOX")
> (nnimap-split-methods ,nnmail-split-methods)
> )))
As I discovered fancy splitting which produces a more readable filtering
list I switched to it but still it does not do any splitting.
Here is the code I now use after reading your comments:
(setq nnmail-split-fancy
'(|
("from" "toto@example.com"
(|
("subject" "toto" "INBOX.toto")
("subject" "tutu" "INBOX.tutu")
)
)
;; default destination group for unclassified mails,
;; don't leave them in INBOX
"INBOX.unknown"
))
(setq gnus-secondary-select-methods
`((nnimap "MyImapServer"
(nnimap-address "mail.example.com")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.gpg")
(nnimap-expunge t)
(nnimap-split-fancy ,nnmail-split-fancy)
)))
--
Olivier
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: nnimap splitting (yeah again)
2011-03-05 13:39 ` Olivier Sirven
@ 2011-03-07 11:23 ` Olivier Sirven
0 siblings, 0 replies; 5+ messages in thread
From: Olivier Sirven @ 2011-03-07 11:23 UTC (permalink / raw)
To: ding
On 2011-03-05 14:39:22, Olivier Sirven <the.slaa@gmail.com> wrote:
> As I discovered fancy splitting which produces a more readable filtering
> list I switched to it but still it does not do any splitting.
> Here is the code I now use after reading your comments:
>
> (setq nnmail-split-fancy
> '(|
> ("from" "toto@example.com"
> (|
> ("subject" "toto" "INBOX.toto")
> ("subject" "tutu" "INBOX.tutu")
> )
> )
> ;; default destination group for unclassified mails,
> ;; don't leave them in INBOX
> "INBOX.unknown"
> ))
>
> (setq gnus-secondary-select-methods
> `((nnimap "MyImapServer"
> (nnimap-address "mail.example.com")
> (nnimap-server-port 993)
> (nnimap-stream ssl)
> (nnimap-authinfo-file "~/.authinfo.gpg")
> (nnimap-expunge t)
> (nnimap-split-fancy ,nnmail-split-fancy)
> )))
I finally got my splitting rules working! For the record and for other
people who are/will having troubles as I did: nnimap-split-fancy should
not be used in the server configuration, just use nnimap-split-methods
even if you're using fancy splitting. So you'll have something like
this:
--8<---------------cut here---------------start------------->8---
(setq gnus-secondary-select-methods
`((nnimap "MyImapServer"
(nnimap-address "mail.example.com")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.gpg")
(nnimap-expunge t)
(nnimap-inbox "INBOX")
(nnimap-split-methods
(|
("from" "toto@example.com"
(|
("subject" "toto" "INBOX.toto")
("subject" "tutu" "INBOX.tutu")
)
)
;; default destination group for unclassified mails,
;; don't leave them in INBOX
"INBOX.unknown"
)))))
--8<---------------cut here---------------end--------------->8---
Hope this helps other
--
Olivier
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-07 11:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-04 10:20 nnimap splitting (yeah again) Olivier Sirven
2011-03-04 14:06 ` Olivier Sirven
2011-03-05 10:14 ` Lars Magne Ingebrigtsen
2011-03-05 13:39 ` Olivier Sirven
2011-03-07 11:23 ` Olivier Sirven
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).