Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Gnus with multiple gmail imap accounts
@ 2010-07-28 16:24 Richard Riley
  2010-07-28 19:14 ` Richard Riley
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Riley @ 2010-07-28 16:24 UTC (permalink / raw)
  To: info-gnus-english


I would be interested in hearing how anyone has got gnus talking to
multiple gmail accounts. One sticking point is the non prefixed INBOX on
each account. How best to handle this or to uniquely name each INBOX for
each gmail account? (Come to that how to uniquely name All Mail, spam etc too).

There is some advice here

http://superuser.com/questions/86798/multiple-email-accounts-from-the-same-server-in-emacs-gnus

But I'm not sure how he defined those servers with their aliases in elisp (the author has
since dropped gnus for wanderlust).

One approach I have tried (but dont really like) is to apply a filter to ALL
incoming mail and to label each new post with something like
"inbox-rileyrg" and then subscribe to that "label/group" from gnus. That
doesnt solve the issue with the gmail system labels however.

Any pointers appreciated.

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

* Re: Gnus with multiple gmail imap accounts
  2010-07-28 16:24 Gnus with multiple gmail imap accounts Richard Riley
@ 2010-07-28 19:14 ` Richard Riley
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Riley @ 2010-07-28 19:14 UTC (permalink / raw)
  To: info-gnus-english

Richard Riley <rileyrg@gmail.com> writes:

> I would be interested in hearing how anyone has got gnus talking to
> multiple gmail accounts. One sticking point is the non prefixed INBOX on
> each account. How best to handle this or to uniquely name each INBOX for
> each gmail account? (Come to that how to uniquely name All Mail, spam etc too).
>
> There is some advice here
>
> http://superuser.com/questions/86798/multiple-email-accounts-from-the-same-server-in-emacs-gnus
>
> But I'm not sure how he defined those servers with their aliases in elisp (the author has
> since dropped gnus for wanderlust).
>
> One approach I have tried (but dont really like) is to apply a filter to ALL
> incoming mail and to label each new post with something like
> "inbox-rileyrg" and then subscribe to that "label/group" from gnus. That
> doesnt solve the issue with the gmail system labels however.
>
> Any pointers appreciated.

I have settled on this solution.

Firstly create your nnimap servers :-

--8<---------------cut here---------------start------------->8---
  (setq gnus-secondary-select-methods '((nnimap "rileymail"
                                                (nnimap-server-port 993)
                                                (nnimap-stream ssl)                                                             
                                                (nnir-search-engine imap)
                                                (nnimap-address "imap.gmail.com")
                                                (nnimap-list-pattern ("inbox-" "webs" "tax"))
                                                (nnimap-authinfo-file "~/.authinfo.gpg")
                                                )
                                        (nnimap "shamrockmail"
                                                (nnimap-server-port 993)
                                                (nnimap-stream ssl)                                                             
                                                (nnir-search-engine imap)
                                                (nnimap-address "imap.gmail.com")
                                                (nnimap-list-pattern ("inbox-"))
                                                (nnimap-authinfo-file "~/.authinfo.gpg")
                                                )
                                        (nnimap "friendsmail"
                                                (nnimap-server-port 993)
                                                (nnimap-stream ssl)                                                             
                                                (nnir-search-engine imap)
                                                (nnimap-address "imap.gmail.com")
                                                (nnimap-list-pattern ("inbox-"))
                                                (nnimap-authinfo-file "~/.authinfo.gpg")
                                                )
                                        ))

--8<---------------cut here---------------end--------------->8---

Notice the nnimap-list-pattern - this limits the imap folders you can
see. Gmail is messy. Tweak as appropriate.

Then for each  account alias above add a line to your .authinfo (I use a gpg
file) like this :-

--8<---------------cut here---------------start------------->8---
machine friendsmail login gmailuserid force yes password mypassword port 993
--8<---------------cut here---------------end--------------->8---

Now the important thing is to set up each gmail account so that you can
uniquely recognise things and not have clashing INBOXs. This is done by
creating a filter on my INBOX for each account where in "words to search
for" you use "in:inbox" and specify that filter to then apply a label to
all incoming email. So I have a filter on my rileyrg account which
applies a label "inbox-personal" to all incoming mail. When I browse the
"rileymail" nnimap server shown above I then see and subscribe to an
IMAP group called .. inbox-personal. For the shamrockmail I apply the
label "inbox-shamrock". etc etc - easy to differentiate the different
INBOXs this way.

Seems to work well but I would be interested to hear any alternative and
potentially simpler methods.

One thing now I miss not using offlineimap to store mail locally is the
use mairix. Is there some way to search all mail via imap? I think alt-s
only searches the mails in the summary buffer and not all the mails.

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

end of thread, other threads:[~2010-07-28 19:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-28 16:24 Gnus with multiple gmail imap accounts Richard Riley
2010-07-28 19:14 ` Richard Riley

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