(setq gnus-secondary-select-methods
'(
(nnimap "work"
(nnimap-stream ssl)
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
)
(nnimap "personal"
(nnimap-stream ssl)
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
)
)
)
'(
(nnimap "work"
(nnimap-stream ssl)
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
)
(nnimap "personal"
(nnimap-stream ssl)
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
)
)
)
That works fine but it prompts for usernames and passwords, so I need some entries in my .authinfo file to automate that. Unfortunately, a simple view of that would have me writing a .authinfo like this:
machine imap.gmail.com login work-email password work-password port 993
machine imap.gmail.com login personal-email password personal-password port 993
But of course that won't work because both lines get triggered when Gnus tries to access either account, since both are on "imap.gmail.com". In practice I think it means it would just access my work account twice. But, according to Simon Josefsson:machine imap.gmail.com login personal-email password personal-password port 993
nnimap has solved this problem by letting you use, instead of the server address, the virtual Gnus server name when specifying username/passwords in the authinfo file.So that means I should be able to change the above to:
machine work login work-email password work-password port 993
machine personal login personal-email password personal-password port 993
machine personal login personal-email password personal-password port 993
However, that didn't work. Gnus acted just as if it didn't recognize either of those and insisted on me authenticating interactively. But, helpful people at gmane.emacs.gnus.general (thanks Tassilo) provided the simple solution. All I had to do was append the "force yes" command to the end of each of those lines, like this:
machine work login work-email password work-password port 993 force yes
machine personal login personal-email password personal-password port 993 force yes
machine personal login personal-email password personal-password port 993 force yes
Now it's working fine.
No comments:
Post a Comment