Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Helmut Waitzmann <nn.throttle@xoxy.net>
To: info-gnus-english@gnu.org
Subject: Re: Need help on setting multiple gmail imap account
Date: Fri, 16 Jan 2015 07:26:12 +0100	[thread overview]
Message-ID: <8761c75jhe.fsf@helmutwaitzmann.news.arcor.de> (raw)
In-Reply-To: <loom.20141229T171507-986@post.gmane.org>

Eric <thegreatfq@gmail.com> 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



      parent reply	other threads:[~2015-01-16  6:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29 16:17 Eric
2014-12-29 17:36 ` Adam Sjøgren
2015-01-16  6:26 ` Helmut Waitzmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761c75jhe.fsf@helmutwaitzmann.news.arcor.de \
    --to=nn.throttle@xoxy.net \
    --cc=info-gnus-english@gnu.org \
    --cc=oe.throttle@xoxy.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).