Re: multiple Gmail accounts + nnimap + ~/.authinfo
  Home FAQ Contact Sign in
gnu.emacs.gnus only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: multiple Gmail accounts + nnimap + ~/.authinfo         

Group: gnu.emacs.gnus · Group Profile
Author: Ted Zlatanov
Date: Apr 17, 2008 07:50

On Thu, 17 Apr 2008 17:10:33 +0800 CHENG Gao gmail.com> wrote:
CG> *On Thu, 17 Apr 2008 09:24:04 +0200
CG> * Also sprach Suno Ano googlemail.com>:
>> Hi Ted, did someone else had an idea how to approach this issue? What
>> are we/you going to do now? I can help coding (but not before June I am
>> afraid ... /me lacks the time :-/)
>>
>> I think using nnimap with several gmail accounts is something quite a
>> lot people might want to do ...
CG> In your .gnus you can use LABELS for each account, and then in .authinfo
CG> you use label instead of server address. Something like:
CG> in .gnus:
CG> ,----
CG> | (nnimap "gmail-account-1"
CG> | (nnimap-server-port 143)
CG> | (nnimap-address "imap.gmail.com")
CG> | (nnimap-list-pattern ("INBOX" "mail/*"))
CG> | (nnimap-authinfo-file "~/.emacs.d/.authinfo"))
CG> `----
CG> (You can add multiple accounts)
CG> then in .authinfo:
CG> ,----
CG> | machine gmail-account-1 login account1@gmail.com password yourpass port 143
CG> | machine gmail-account-2 login account2@gmail.com password yourpass port 143
CG> `----

I see now in nnimap.el:nnimap-open-connection:

(let* (
[...]
(user (netrc-machine-user-or-password
"login"
list
(list server
(or nnimap-server-address
nnimap-address))
(list port)
(list "imap" "imaps" "143" "993")))
(passwd (netrc-machine-user-or-password
"password"
list
(list server
(or nnimap-server-address
nnimap-address))
(list port)
(list "imap" "imaps" "143" "993"))))
[...]

So the nnimap address is used after the server name. I didn't see that
before when I looked at the code quickly. Thanks for noting that.

Suno, sorry about that. Let me know if Gao's solution works for you
please.

Ted
no comments
diggit! del.icio.us! reddit!