Re: IMAP - two accounts on one server

2016-09-22 Thread Loris Bennett
Ted Zlatanov  writes:

> On Thu, 22 Sep 2016 11:39:06 +0200 "Loris Bennett" 
>  wrote: 
>
> ...
> LB> I have now discovered that this in fact works, but only if I don't save
> LB> the credentials in .authinfo.  If I enter both sets of credentials every
> LB> time, Gnus shows me folders from both accounts.
> ...
> LB> So to me it looks like there is a problem when .authinfo is read, but
> LB> obviously some people have this kind of setup working with two Gmail
> LB> accounts.  So I'm stumped.
>
> Set `auth-source-debug' to 'trivia and show the relevant lines from the
> *Messages* buffer when you get the bad behavior.

Thanks for this advice.  However "unfortunately" the problem has
disappeared after restarting emacs a few times.  Nevertheless it will be
handy for the next problem, but I'll start a new thread for that.

Cheers,

Loris

-- 
This signature is currently under construction.
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-22 Thread Ted Zlatanov
On Thu, 22 Sep 2016 11:39:06 +0200 "Loris Bennett"  
wrote: 

...
LB> I have now discovered that this in fact works, but only if I don't save
LB> the credentials in .authinfo.  If I enter both sets of credentials every
LB> time, Gnus shows me folders from both accounts.
...
LB> So to me it looks like there is a problem when .authinfo is read, but
LB> obviously some people have this kind of setup working with two Gmail
LB> accounts.  So I'm stumped.

Set `auth-source-debug' to 'trivia and show the relevant lines from the
*Messages* buffer when you get the bad behavior.

Thanks
Ted
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-22 Thread Ted Zlatanov
On Wed, 21 Sep 2016 17:07:36 +0200 a...@koldfront.dk (Adam Sjøgren) wrote: 

AS> Ted writes:
>> (info "(auth) Multiple GMail accounts with Gnus")

AS> I can't find that info-page in my Emacs. Maybe it is too old? (GNU Emacs
AS> 24.5.1)

That's weird, it's been part of Emacs for a while and I can definitely
access it.

Ted
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-22 Thread Adam Sjøgren
Loris writes:

>  '(gnus-secondary-select-methods
>(quote
> ((nnimap "mail.zedat.fu-berlin.de"

What happens if you change the name of this server to something that is
not exactly the same as the hostname?

What does your .authinfo.gpg look like? (Remember to remove passwords.)

>  (nnimap-stream tls)
>  (nnir-search-engine imap)
>  (remove-prefix "nnimap")
>  (nnimap-address "mail.zedat.fu-berlin.de"))
>  (nnimap "fu_exchange"
>  (nnimap-stream tls)
>  (nnir-search-engine imap)
>  (remove-prefix "nnimap")
>  (nnimap-address "mail.zedat.fu-berlin.de"))
>  (nntp "news.fu-berlin.de"
>(remove-prefix nntp)

Maybe the .authinfo guessing-logic is "too smart"; that's the only thing
I can think of.


  Best regards,

Adam

-- 
 "Jeg har det bedst med en sort hætte over hovedet og Adam Sjøgren
  en dukke." a...@koldfront.dk


___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-22 Thread Loris Bennett
a...@koldfront.dk (Adam Sjøgren) writes:

> Loris writes:
>
>> I still have the problem that I can only access one of the accounts.
>> The same set of folders appear twice, once each for the secondary
>> select method entries "one" and "two".
>
> Show your configuration.
>
> Otherwise we can be guessing forever.
>

OK:

 '(gnus-secondary-select-methods
   (quote
((nnimap "mail.zedat.fu-berlin.de"
 (nnimap-stream tls)
 (nnir-search-engine imap)
 (remove-prefix "nnimap")
 (nnimap-address "mail.zedat.fu-berlin.de"))
 (nnimap "fu_exchange"
 (nnimap-stream tls)
 (nnir-search-engine imap)
 (remove-prefix "nnimap")
 (nnimap-address "mail.zedat.fu-berlin.de"))
 (nntp "news.fu-berlin.de"
   (remove-prefix nntp)

I have now discovered that this in fact works, but only if I don't save
the credentials in .authinfo.  If I enter both sets of credentials every
time, Gnus shows me folders from both accounts.

If I do allow Gnus to add an entry for "mail.zedat.fu-berlin.de", then I
don't get asked about the credentials for the entry "fu_exchange", Gnus
shows me the folders from the "mail.zedat.fu-berlin.de" account but not
those for "fu_exchange".  I also can't subscribe to any folders from
"fu_exchange".

So to me it looks like there is a problem when .authinfo is read, but
obviously some people have this kind of setup working with two Gmail
accounts.  So I'm stumped.

Cheers,

Loris


-- 
This signature is currently under construction.
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-22 Thread Adam Sjøgren
Loris writes:

> I still have the problem that I can only access one of the accounts.
> The same set of folders appear twice, once each for the secondary
> select method entries "one" and "two".

Show your configuration.

Otherwise we can be guessing forever.


  Best regards,

Adam

-- 
 "Accept failure gracefully." Adam Sjøgren
 a...@koldfront.dk


___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-22 Thread Loris Bennett
a...@koldfront.dk (Adam Sjøgren) writes:

> Ted writes:
>
>> On Wed, 21 Sep 2016 10:17:25 +0200 a...@koldfront.dk (Adam Sjøgren) wrote: 
>
>> AS> So you could have something like:
>> ...
>
>> :) This is basically what I wrote in
>> (info "(auth) Multiple GMail accounts with Gnus")
>
> I can't find that info-page in my Emacs. Maybe it is too old? (GNU Emacs
> 24.5.1)

I'm on 24.4.1, where the page probably exists even less.  However, even
if it did exist, wouldn't it be better to call it "Multiple accounts on
the same server with Gnus" if it doesn't just apply to Gmail? 

>> Do you think that page should be expanded? Or maybe linked from the Gnus
>> docs? It seems to keep tripping people up.
>
> Who reads the documentation?
>
> I think the only way to avoid these questions is to change every example
> and every tutorial to _not_ use the hostname of the mail server as the
> name of the server in Gnus.
>
> I don't think it is realistic to do that. Anyway, we need something to
> talk about here as well :-)

Yeah, that ole internet thing sure does need fixin'.

But before I do that, I still have the problem that I can only access
one of the accounts.  The same set of folders appear twice, once
each for the secondary select method entries "one" and "two".

I can get the folders of either account, but Which folders I get seems
to depend on the order of the entries in the .authfile.  So it look as
if, once the connection to the server is made, the connection for the
second account is skipped, because Gnus has already seen the server.  Is
that a possible explanation?

Cheers,

Loris

-- 
This signature is currently under construction.
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-21 Thread Adam Sjøgren
Ted writes:

> On Wed, 21 Sep 2016 10:17:25 +0200 a...@koldfront.dk (Adam Sjøgren) wrote: 

> AS> So you could have something like:
> ...

> :) This is basically what I wrote in
> (info "(auth) Multiple GMail accounts with Gnus")

I can't find that info-page in my Emacs. Maybe it is too old? (GNU Emacs
24.5.1)

> Do you think that page should be expanded? Or maybe linked from the Gnus
> docs? It seems to keep tripping people up.

Who reads the documentation?

I think the only way to avoid these questions is to change every example
and every tutorial to _not_ use the hostname of the mail server as the
name of the server in Gnus.

I don't think it is realistic to do that. Anyway, we need something to
talk about here as well :-)


  Best regards,

Adam

-- 
 "The key to making programs fast is to make them do  Adam Sjøgren
  practically nothing. ;-)"  a...@koldfront.dk


___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-21 Thread Ted Zlatanov
On Wed, 21 Sep 2016 10:17:25 +0200 a...@koldfront.dk (Adam Sjøgren) wrote: 

AS> There is, but the way people demonstrate mail configuration often
AS> obscures this.

AS> The point is that that the string after "machine" does NOT have to be
AS> the hostname of the server. It can be anything, as long as it matches
AS> your configuration of the nnimap server in Gnus.

AS> So you could have something like:
...

:) This is basically what I wrote in
(info "(auth) Multiple GMail accounts with Gnus")

Do you think that page should be expanded? Or maybe linked from the Gnus
docs? It seems to keep tripping people up.

Ted
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-21 Thread Loris Bennett
Eric Abrahamsen  writes:

> "Loris Bennett"  writes:
>
>> Hi,
>>
>> Many years ago I set Gnus up to read mail from a server via IMAP and
>> every thing has been working fine.  I now want to add a second account
>> on the same server[1].
>>
>> I have added a corresponding line to .authinfo, but there doesn't seem
>> to be a variable I could add to the select method to indicate which
>> account should be used.
>>
>> Currently I just don't see any extra folders from the second account and
>> they do not appear when I try to subscribe to additional folder.
>>
>> Any ideas?
>>
>> Cheers,
>>
>> Loris
>>
>> Footnotes: 
>> [1]  To be honest, the accounts are not on the same server.  However,
>> the server address is the same in both cases.  Behind the scenes some
>> jiggery-pokery goes on to forward mail to a second server in the case of
>> the second account.  
>
> You didn't mention adding the second server to
> `gnus-secondary-select-methods' -- that's the key step. Have you done
> that? Gnus won't know about the server until you put it there, and once
> it does know, it can handle the ~/.authinfo step by itself.

Sorry, I wasn't explicit enough.  I did realise that I needed another
entry in 'gnus-secondary-select-methods', but I just couldn't see how to
differentiate if from the existing one, given that I was using the
server address as the name of the entry, and this is the same for both
accounts.  Thus, Adam pointing out that the "Address" for the select
method can be any string, not just the server address, was very helpful.

Cheers,

Loris

-- 
This signature is currently under construction.
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-21 Thread Adam Sjøgren
Loris writes:

> I have added a corresponding line to .authinfo, but there doesn't seem
> to be a variable I could add to the select method to indicate which
> account should be used.

There is, but the way people demonstrate mail configuration often
obscures this.

The point is that that the string after "machine" does NOT have to be
the hostname of the server. It can be anything, as long as it matches
your configuration of the nnimap server in Gnus.

So you could have something like:

  (setq gnus-secondary-select-methods
'(
   (nnimap "one"
   (nnimap-address "imap.gmail.com"))
   (nnimap "other"
   (nnimap-address "imap.gmail.com"

in your .gnus, and in .authinfo you would match those up with:

  machine one login someth...@gmail.com password "verysecret" port imap
  machine other login somethinge...@gmail.com password "alsosecret" port imap

Hope this helps.


  Best regards,

Adam

-- 
 "The Web is not high school."Adam Sjøgren
 a...@koldfront.dk


___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: IMAP - two accounts on one server

2016-09-21 Thread Eric Abrahamsen
"Loris Bennett"  writes:

> Hi,
>
> Many years ago I set Gnus up to read mail from a server via IMAP and
> every thing has been working fine.  I now want to add a second account
> on the same server[1].
>
> I have added a corresponding line to .authinfo, but there doesn't seem
> to be a variable I could add to the select method to indicate which
> account should be used.
>
> Currently I just don't see any extra folders from the second account and
> they do not appear when I try to subscribe to additional folder.
>
> Any ideas?
>
> Cheers,
>
> Loris
>
> Footnotes: 
> [1]  To be honest, the accounts are not on the same server.  However,
> the server address is the same in both cases.  Behind the scenes some
> jiggery-pokery goes on to forward mail to a second server in the case of
> the second account.  

You didn't mention adding the second server to
`gnus-secondary-select-methods' -- that's the key step. Have you done
that? Gnus won't know about the server until you put it there, and once
it does know, it can handle the ~/.authinfo step by itself.

E


___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


IMAP - two accounts on one server

2016-09-21 Thread Loris Bennett
Hi,

Many years ago I set Gnus up to read mail from a server via IMAP and
every thing has been working fine.  I now want to add a second account
on the same server[1].

I have added a corresponding line to .authinfo, but there doesn't seem
to be a variable I could add to the select method to indicate which
account should be used.

Currently I just don't see any extra folders from the second account and
they do not appear when I try to subscribe to additional folder.

Any ideas?

Cheers,

Loris

Footnotes: 
[1]  To be honest, the accounts are not on the same server.  However,
the server address is the same in both cases.  Behind the scenes some
jiggery-pokery goes on to forward mail to a second server in the case of
the second account.  

-- 
This signature is currently under construction.
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english