Gnus development mailing list
 help / color / mirror / Atom feed
* using nnimap-split-fancy to split mail on server?
@ 2014-12-22 16:48 Stephen Leake
  2015-01-26  3:29 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Leake @ 2014-12-22 16:48 UTC (permalink / raw)
  To: ding

I've been using Gnus with a POP backend forever, but I've recently
decided it would be nice to occasionally reference an email on my
smartphone.

So I'm switching to imap. I have several groups set up, and was hoping
that Gnus would automagically create the same groups on the sever as
separate IMAP mailboxes. But that doesn't seem to work.

The Gnus manual does not specifically address this, as far as I can see.
Browsing thru the ding archive on gmane I find some articles that seem
to imply it should work. Browsing thru nnimap.el I find
nnimap-request-move-article, so the infrastructure for this seems to be
there.

Here's my setup:

(setq mail-sources
      '((imap :server "mail.stephe-leake.org"
	      :user "stephen_leake@stephe-leake.org"
	      :port 143
	      :stream 'network
	      :fetchflag "\\Seen"
	      )
        ))

(setq nnimap-split-fancy
      '(|
	;; spam
	("subject" "SPAMSPAM" "spam")
	("from" "strat laios <stratlaios@verizon.net>" "spam")

        ;; These are before 'home' rules because people reply "to:" me,
        ;; "cc:" group
        ("to\\|cc" "bbdb-info" "bbdb-info")
        ("to\\|cc" "debian-ada" "debian-ada")
        ("to\\|cc" "debian" "spam")

...
))

This splits mail as expected in Gnus on my laptop. But when I access the
same server account via the GMail app on my smartphone, it does not show
the mailboxes/folders (it shows only the default 4 folders: Drafts,
Junk, Sent, Trash). I can search to find the mail I'm looking for, but
the folders would be very nice.

Is there anything else I need to do?

-- 
-- Stephe



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

* Re: using nnimap-split-fancy to split mail on server?
  2014-12-22 16:48 using nnimap-split-fancy to split mail on server? Stephen Leake
@ 2015-01-26  3:29 ` Lars Ingebrigtsen
  2015-01-26 10:04   ` Stephen Leake
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2015-01-26  3:29 UTC (permalink / raw)
  To: Stephen Leake; +Cc: ding

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> (setq nnimap-split-fancy
>       '(|
> 	;; spam
> 	("subject" "SPAMSPAM" "spam")
> 	("from" "strat laios <stratlaios@verizon.net>" "spam")
>
>         ;; These are before 'home' rules because people reply "to:" me,
>         ;; "cc:" group
>         ("to\\|cc" "bbdb-info" "bbdb-info")
>         ("to\\|cc" "debian-ada" "debian-ada")
>         ("to\\|cc" "debian" "spam")
>
> ...
> ))
>
> This splits mail as expected in Gnus on my laptop. But when I access the
> same server account via the GMail app on my smartphone, it does not show
> the mailboxes/folders (it shows only the default 4 folders: Drafts,
> Junk, Sent, Trash). I can search to find the mail I'm looking for, but
> the folders would be very nice.
>
> Is there anything else I need to do?

That seems very odd.  Gnus really creates the folders on the server, so
you should be able to see them with any client.  So either there's
something wrong with that other client, or Gmail is doing something
wonky here again...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: using nnimap-split-fancy to split mail on server?
  2015-01-26  3:29 ` Lars Ingebrigtsen
@ 2015-01-26 10:04   ` Stephen Leake
  2015-01-27  0:55     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Leake @ 2015-01-26 10:04 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Stephen Leake <stephen_leake@stephe-leake.org> writes:
>
>> (setq nnimap-split-fancy
>>       '(|
>> 	;; spam
>> 	("subject" "SPAMSPAM" "spam")
>> 	("from" "strat laios <stratlaios@verizon.net>" "spam")
>>
>>         ;; These are before 'home' rules because people reply "to:" me,
>>         ;; "cc:" group
>>         ("to\\|cc" "bbdb-info" "bbdb-info")
>>         ("to\\|cc" "debian-ada" "debian-ada")
>>         ("to\\|cc" "debian" "spam")
>>
>> ...
>> ))
>>
>> This splits mail as expected in Gnus on my laptop. But when I access the
>> same server account via the GMail app on my smartphone, it does not show
>> the mailboxes/folders (it shows only the default 4 folders: Drafts,
>> Junk, Sent, Trash). I can search to find the mail I'm looking for, but
>> the folders would be very nice.
>>
>> Is there anything else I need to do?
>
> That seems very odd.  Gnus really creates the folders on the server, so
> you should be able to see them with any client.  So either there's
> something wrong with that other client, or Gmail is doing something
> wonky here again...

I figured out what is going on.

There are (at least) two ways to use imap in Gnus:

nnml back-end with mail-sources set to '(imap ...)

nnimap back-end


It would be better if the Gnus manual section on imap mentioned both of
these.

I was using the nnml backend; the imap interface for that does not
create folders on the server. In fact, it ignores nnimap-split-fancy, so
my testing with the above setting was confused.

I tried to use the nnimap back-end, but never got splitting to work. I
did discover it is _much_ slower than nnml when reading mail (in moving
from one message to the next; I assume because it is telling the server
that message has now been read). Splitting on the server is not critical
for me (I only access this account thru gmail occasionally), so I'm
sticking with the nnml back-end.


It might make sense for the nnml imap interface to also split mail on
the server, as long as it does not talk to the server after that
splitting. I can see there could be problems with that.

-- 
-- Stephe



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

* Re: using nnimap-split-fancy to split mail on server?
  2015-01-26 10:04   ` Stephen Leake
@ 2015-01-27  0:55     ` Lars Ingebrigtsen
  2015-01-27  9:25       ` Stephen Leake
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2015-01-27  0:55 UTC (permalink / raw)
  To: Stephen Leake; +Cc: ding

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> It might make sense for the nnml imap interface to also split mail on
> the server, as long as it does not talk to the server after that
> splitting. I can see there could be problems with that.

If you're using IMAP as a mail source, then Gnus will download the
messages and delete them from the server, right?  So there's nothing to
"split" on the server.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: using nnimap-split-fancy to split mail on server?
  2015-01-27  0:55     ` Lars Ingebrigtsen
@ 2015-01-27  9:25       ` Stephen Leake
  2015-01-27 10:16         ` Stephen Leake
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Leake @ 2015-01-27  9:25 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Stephen Leake <stephen_leake@stephe-leake.org> writes:
>
>> It might make sense for the nnml imap interface to also split mail on
>> the server, as long as it does not talk to the server after that
>> splitting. I can see there could be problems with that.
>
> If you're using IMAP as a mail source, then Gnus will download the
> messages and delete them from the server, right?  So there's nothing to
> "split" on the server.

I have :fetchflag set to \Seen, so the messages are left on the server
(as described in (info "(gnus) Mail Source Specifiers")).

I'm not clear if they are ever deleted from the server; I hope nnml does
that when expired; I'll have to check.

-- 
-- Stephe



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

* Re: using nnimap-split-fancy to split mail on server?
  2015-01-27  9:25       ` Stephen Leake
@ 2015-01-27 10:16         ` Stephen Leake
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2015-01-27 10:16 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: ding

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Stephen Leake <stephen_leake@stephe-leake.org> writes:
>>
>>> It might make sense for the nnml imap interface to also split mail on
>>> the server, as long as it does not talk to the server after that
>>> splitting. I can see there could be problems with that.
>>
>> If you're using IMAP as a mail source, then Gnus will download the
>> messages and delete them from the server, right?  So there's nothing to
>> "split" on the server.
>
> I have :fetchflag set to \Seen, so the messages are left on the server
> (as described in (info "(gnus) Mail Source Specifiers")).
>
> I'm not clear if they are ever deleted from the server; I hope nnml does
> that when expired; I'll have to check.

Apparently not; nnmail-delete-file-function is set to delete-file.

So I'll have to customize that to do what nnimap-delete-article does.

-- 
-- Stephe



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

end of thread, other threads:[~2015-01-27 10:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-22 16:48 using nnimap-split-fancy to split mail on server? Stephen Leake
2015-01-26  3:29 ` Lars Ingebrigtsen
2015-01-26 10:04   ` Stephen Leake
2015-01-27  0:55     ` Lars Ingebrigtsen
2015-01-27  9:25       ` Stephen Leake
2015-01-27 10:16         ` Stephen Leake

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).