Eric <[email protected]> writes:

> (add-to-list 'gnus-secondary-select-methods
>            '(nnimap "name1"
>                       (nnimap-address "imap.gmail.com")
>                       (nnimap-server-port 993)
>                       (nnimap-stream ssl)
>                       (nnir-search-engine imap)
>                       (nnmail-expiry-target "nnimap+gmail:[Gmail]/Trash")
>                       (nnmail-expiry-wait 90))
>            '(nnimap "name2"
>                      (nnimap-address "imap.gmail.com")
>                      (nnimap-server-port 993)
>                      (nnimap-stream ssl)))
>
> the authinfo file has:
> machine name1 login email1 <at> gmail.com password mypass1 port 993 force yes
> machine name2 login email2 <at> gmail.com password mypass2 port 993 force yes
>
> but it doesn't work for me. There are several other solutions like this
> online. Looks like gnus is trying to connect to name1 and name2 which is not
> a real server name. It might be possible by editing the etc/host file.

Use a different authinfo file for each of the two accounts:

> (add-to-list 'gnus-secondary-select-methods
>            '(nnimap "name1"
                      (nnimap-authinfo-file "~/name1.authinfo")
>                       (nnimap-address "imap.gmail.com")
>                       (nnimap-server-port 993)
>                       (nnimap-stream ssl)
>                       (nnir-search-engine imap)
>                       (nnmail-expiry-target "nnimap+gmail:[Gmail]/Trash")
>                       (nnmail-expiry-wait 90))
>            '(nnimap "name2"
                      (nnimap-authinfo-file "~/name2.authinfo")
>                      (nnimap-address "imap.gmail.com")
>                      (nnimap-server-port 993)
>                      (nnimap-stream ssl)))

The contents of the authinfo files are then

~/name1.authinfo:
machine imap.gmail.com login email1 <at> gmail.com password mypass1 port 993 
force yes

~/name2.authinfo:
machine imap.gmail.com login email2 <at> gmail.com password mypass2 port 993 
force yes


_______________________________________________
info-gnus-english mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to