Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: wgreenhouse-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org (W. Greenhouse)
To: info-gnus-english-mXXj517/zsQ@public.gmane.org
Subject: Re: How to set up multiple username on same IMAP server?
Date: Mon, 01 Apr 2013 03:55:43 +0000	[thread overview]
Message-ID: <876206lxa8.fsf@riseup.net> (raw)
In-Reply-To: <852a05d7-5d39-4eb4-88f9-8a685c69ee46@googlegroups.com>

Hello Hideyuki,

Hideyuki Ito <ito.hideyuki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi, 
>
> I'd like to set up multiple username(usreacount) on same IMAP server
> (imap.gmail.com).
>
> Could you tell me how to write it in .gnus.el and .authinfo ?
>
>
> Currently, I'd written them as
>
> (setq gnus-select-method '(nnnil)
>       gnus-secondary-select-methods
>       `(
> 	(nnimap "FOO"
> 		(nnimap-address "imap.gmail.com")
> 		(nnimap-server-port 993)
> 		(nnimap-authinfo-file "~/.authinfo")
> 		(nnimap-stream ssl)
> 		(nnir-search-engine imap))
> 	(nnimap "BAR"
> 		(nnimap-inbox "INBOX")
> 		(nnimap-address "imap.gmail.com")
> 		(nnimap-server-port 993)
> 		(nnimap-authinfo-file "~/.authinfo")
> 		(nnimap-stream ssl)
> 		(nnir-search-engine imap))
> 	))
>
> I'd like to use username "foo" and password "passfoo" on Foo IMAP
> connection and username "bar" and password "passbar" on BAR IMAP
> connection. What elisp descriptions are required?
>
> Thanks, 

Try this:

~/.gnus.el

(setq gnus-select-method '(nnnil)
     gnus-secondary-select-methods
     '(
        (nnimap "FOO"
		(nnimap-address "imap.gmail.com")
                (nnimap-user "foo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"))
	(nnimap "BAR"
		(nnimap-address "imap.gmail.com")
                (nnimap-user "bar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"))))

;; nnimap-server-port, nnimap-authinfo-file, nnimap-stream, and
;; nnir-search-engine are at defaults and may safely be omitted


~/.authinfo

machine imap.gmail.com login foo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org port imaps password foopass
machine smtp.gmail.com login foo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org port 465 password foopass
machine imap.gmail.com login bar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org port imaps password barpass
machine smtp.gmail.com login bar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org port 465 password barpass

>
> --
> Hideyuki Ito
> An Absolute Beginner

I hope you enjoy Gnus!

For sending, you will need to either use a sendmail application capable
of choosing SMTP accounts based on the From: header, such as msmtp (
http://www.emacswiki.org/emacs/GnusMSMTP ), or configure Emacs's
built-in smtpmail.el according to one of the methods described in
http://www.emacswiki.org/emacs/MultipleSMTPAccounts.  I am currently
happy with using smtpmail.el for multiple accounts, but it does require
some more configuration to be useful.

Best,
Will

-- 
BOFH excuse #346:

Your/our computer(s) had suffered a memory leak, and we are waiting for
them to be topped up.

  reply	other threads:[~2013-04-01  3:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01  2:10 Hideyuki Ito
2013-04-01  3:55 ` W. Greenhouse [this message]
     [not found] ` <mailman.23197.1364788550.855.info-gnus-english@gnu.org>
2013-04-02 21:08   ` Hideyuki Ito

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=876206lxa8.fsf@riseup.net \
    --to=wgreenhouse-sgozh3hwpm2stnjn9+bgxg@public.gmane.org \
    --cc=info-gnus-english-mXXj517/zsQ@public.gmane.org \
    /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).