Gnus development mailing list
 help / color / mirror / Atom feed
* dovecot: imap: Connecting to localhost...failed
@ 2009-04-19 22:32 Dan Davison
  2009-04-20  7:17 ` Tassilo Horn
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Davison @ 2009-04-19 22:32 UTC (permalink / raw)
  To: ding

Would someone mind helping me get going with dovecot serving
locally-stored maildir please? I think it's going to be something
simple/stupid, as I haven't got past the first hurdle. The short version
is: I'm using

--8<---------------cut here---------------start------------->8---
(setq gnus-select-method 
      '(nnimap "dc" (nnimap-address "localhost")))
--8<---------------cut here---------------end--------------->8---

and I'm getting

--8<---------------cut here---------------start------------->8---
imap: Connecting to localhost...failed
nnimap (dc) open error: 'nil'.  Continue? (y or n) 
Couldn't open server on dc
--8<---------------cut here---------------end--------------->8---

The long version is below.

Thanks a lot,

Dan


My mail is stored locally in maildir format folders under ~/Maildir, i.e.

--8<---------------cut here---------------start------------->8---
~/Maildir/folder1/{cur,new,tmp}
~/Maildir/folder2/{cur,new,tmp}
...
--8<---------------cut here---------------end--------------->8---

I have email reading under gnus working with

--8<---------------cut here---------------start------------->8---
(setq gnus-select-method '(nnmaildir "email" (directory "~/Maildir/")))
--8<---------------cut here---------------end--------------->8---

but I want to use nnimap. I am trying

--8<---------------cut here---------------start------------->8---
(setq gnus-select-method 
      '(nnimap "dc" (nnimap-address "localhost")))
--8<---------------cut here---------------end--------------->8---

but in the *Messages* buffer I'm getting 

--8<---------------cut here---------------start------------->8---
imap: Connecting to localhost...failed
nnimap (dc) open error: 'nil'.  Continue? (y or n) 
Couldn't open server on dc
--8<---------------cut here---------------end--------------->8---

I'm on ubuntu 9.04 (same problem under 8.10), and have installed
dovecot-common and dovecot-imapd.

I have dovecot running:

--8<---------------cut here---------------start------------->8---
~> ps -u root | grep dovecot
 3302 ?        00:00:00 dovecot
21401 ?        00:00:00 dovecot-auth
--8<---------------cut here---------------end--------------->8---

The only thing I'm changing in the dovecot config file is
mail_location. I've tried two values for that:
--8<---------------cut here---------------start------------->8---
mail_location = maildir:~/Maildir
mail_location = maildir:~/Maildir:LAYOUT=fs
--8<---------------cut here---------------end--------------->8---

And I've tried two folder layout arrangements:

1. ~/Maildir is a single maildir, with ~/Maildir/{cur,new,tmp} and
2. ~/Maildir holds multiple maildirs, i.e.
--8<---------------cut here---------------start------------->8---
~/Maildir/folder1/{cur,new,tmp}
~/Maildir/folder2/{cur,new,tmp}
...
--8<---------------cut here---------------end--------------->8---

I've tried the 4 different possible combinations of those two settings
but get the same error message. I'm using dovecot -n to check that my
dovecot config settings take effect.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: dovecot: imap: Connecting to localhost...failed
  2009-04-19 22:32 dovecot: imap: Connecting to localhost...failed Dan Davison
@ 2009-04-20  7:17 ` Tassilo Horn
  2009-04-20 15:01   ` Dan Davison
  0 siblings, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2009-04-20  7:17 UTC (permalink / raw)
  To: Dan Davison; +Cc: ding

Dan Davison <davison@stats.ox.ac.uk> writes:

Hi Dan,

> (setq gnus-select-method 
>       '(nnimap "dc" (nnimap-address "localhost")))

That looks correct.  Does it work, if you login using telnet?  I assume
no.

> The only thing I'm changing in the dovecot config file is
> mail_location. I've tried two values for that:
> mail_location = maildir:~/Maildir
> mail_location = maildir:~/Maildir:LAYOUT=fs

I think you cannot say ~, because that will look into the "mail" (or
"imap"?) users $HOME only.  To use the users home put a %u into the
path.  (I didn't test that.  If it doesn't work, have a look at the
docs.  The example dovecot.conf tells you how to do it in the comments
above mail_location.)

HTH,
Tassilo
-- 
The glass is neither half-full nor half-empty: it's twice as big as it
needs to be.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: dovecot: imap: Connecting to localhost...failed
  2009-04-20  7:17 ` Tassilo Horn
@ 2009-04-20 15:01   ` Dan Davison
  2009-04-20 15:16     ` Tassilo Horn
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Davison @ 2009-04-20 15:01 UTC (permalink / raw)
  To: ding; +Cc: tassilo

Hi Tassilo,

Tassilo Horn <tassilo@member.fsf.org> writes:

> Dan Davison <davison@stats.ox.ac.uk> writes:
>
> Hi Dan,
>
>> (setq gnus-select-method 
>>       '(nnimap "dc" (nnimap-address "localhost")))
>
> That looks correct.  Does it work, if you login using telnet?  I assume
> no.

Could you explain exactly what you have in mind here? Does any of the
following answer your question? I can ssh to localhost with no
problem. However if I try telnet I get:

--8<---------------cut here---------------start------------->8---
~> telnet localhost
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
--8<---------------cut here---------------end--------------->8---

I just tried a couple of remote machines and can't telnet to them either
(I can ssh in both cases). But that's to do with telnet not having
approproate security features isn't it? [I haven't used telnet for years
-- I thought it was obsolete technology?]

>
>> The only thing I'm changing in the dovecot config file is
>> mail_location. I've tried two values for that:
>> mail_location = maildir:~/Maildir
>> mail_location = maildir:~/Maildir:LAYOUT=fs
>
> I think you cannot say ~, because that will look into the "mail" (or
> "imap"?) users $HOME only.  To use the users home put a %u into the
> path.  (I didn't test that.  If it doesn't work, have a look at the
> docs.  The example dovecot.conf tells you how to do it in the comments
> above mail_location.)

OK, good point, but I've now tried writing the path explicitly, and I
get the same error:

--8<---------------cut here---------------start------------->8---
mail_location = maildir:/home/dan/Maildir
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
imap: Connecting to localhost...failed
nnimap (dc) open error: 'nil'.  Continue? (y or n) 
Couldn't open server on dc
--8<---------------cut here---------------end--------------->8---

Maybe this is obviously true but I've just checked and dovecot's not
logging any messages when gnus tries to connect (I used dovecot
--log-error to check I can see error messages and turned on auth_verbose
and auth_debug and auth_debug_passwords).

Thanks,

Dan

>
> HTH,
> Tassilo



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: dovecot: imap: Connecting to localhost...failed
  2009-04-20 15:01   ` Dan Davison
@ 2009-04-20 15:16     ` Tassilo Horn
  2009-04-22  5:39       ` Dan Davison
  0 siblings, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2009-04-20 15:16 UTC (permalink / raw)
  To: Dan Davison; +Cc: ding

Dan Davison <davison@stats.ox.ac.uk> writes:

Hi Dan,

>> That looks correct.  Does it work, if you login using telnet?  I
>> assume no.
>
> Could you explain exactly what you have in mind here?

Sure.

> ~> telnet localhost
> Trying 127.0.0.1...
> telnet: Unable to connect to remote host: Connection refused

You also need to specify the port, that is 143 for unencrypted login or
993 for encrypter login.  Here's a sample session:

--8<---------------cut here---------------start------------->8---
% telnet localhost 143    <== My input
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK Dovecot ready.
1 LOGIN uni MY_PASSWORD   <== My input
1 OK Logged in.
2 SELECT INBOX            <== My input
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft gnus-expire KMAILFORWARDED KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $TODO $WATCHED $IGNORED gnus-forward gnus-save)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft gnus-expire KMAILFORWARDED KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $TODO $WATCHED $IGNORED gnus-forward gnus-save \*)] Flags permitted.
* 1501 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1213252650] UIDs valid
* OK [UIDNEXT 2403] Predicted next UID
2 OK [READ-WRITE] Select completed.
--8<---------------cut here---------------end--------------->8---

The lines marked with "<== My input" were entered by me.  Substitute
them with your values and poste dovecot's reply messages here (don't
forget to replace your password).

>> I think you cannot say ~, because that will look into the "mail" (or
>> "imap"?) users $HOME only.  To use the users home put a %u into the
>> path.  (I didn't test that.  If it doesn't work, have a look at the
>> docs.  The example dovecot.conf tells you how to do it in the
>> comments above mail_location.)
>
> OK, good point, but I've now tried writing the path explicitly, and I
> get the same error:
>
> mail_location = maildir:/home/dan/Maildir
>
> imap: Connecting to localhost...failed
> nnimap (dc) open error: 'nil'.  Continue? (y or n) 
> Couldn't open server on dc
>
> Maybe this is obviously true but I've just checked and dovecot's not
> logging any messages when gnus tries to connect (I used dovecot
> --log-error to check I can see error messages and turned on auth_verbose
> and auth_debug and auth_debug_passwords).

I think dovecot normally logs to the system logger.  So you should see
any login attempt in /var/log/dovecot.log or whatever you specified as
log_path in dovecot.conf.

Bye,
Tassilo
-- 
How much wood would a woodchuck chuck if a woodchuck could Chuck Norris?
...All of it.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: dovecot: imap: Connecting to localhost...failed
  2009-04-20 15:16     ` Tassilo Horn
@ 2009-04-22  5:39       ` Dan Davison
  2009-04-22  7:03         ` Tassilo Horn
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Davison @ 2009-04-22  5:39 UTC (permalink / raw)
  To: ding

Tassilo Horn <tassilo@member.fsf.org> writes:

> Dan Davison <davison@stats.ox.ac.uk> writes:
>
> Hi Dan,
>
>>> That looks correct.  Does it work, if you login using telnet?  I
>>> assume no.
>>
>> Could you explain exactly what you have in mind here?
>
> Sure.
>
>> ~> telnet localhost
>> Trying 127.0.0.1...
>> telnet: Unable to connect to remote host: Connection refused
>
> You also need to specify the port, that is 143 for unencrypted login or
> 993 for encrypter login.  Here's a sample session:
>
> % telnet localhost 143    <== My input
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> * OK Dovecot ready.
> 1 LOGIN uni MY_PASSWORD   <== My input
> 1 OK Logged in.
> 2 SELECT INBOX            <== My input
> * FLAGS (\Answered \Flagged \Deleted \Seen \Draft gnus-expire KMAILFORWARDED KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $TODO $WATCHED $IGNORED gnus-forward gnus-save)
> * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft gnus-expire KMAILFORWARDED KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $TODO $WATCHED $IGNORED gnus-forward gnus-save \*)] Flags permitted.
> * 1501 EXISTS
> * 0 RECENT
> * OK [UIDVALIDITY 1213252650] UIDs valid
> * OK [UIDNEXT 2403] Predicted next UID
> 2 OK [READ-WRITE] Select completed.
>
> The lines marked with "<== My input" were entered by me.  Substitute
> them with your values and poste dovecot's reply messages here (don't
> forget to replace your password).

Thanks for that Tassilo. For the record, the other source of help that I
should have found was

http://wiki.dovecot.org/TestInstallation

I hadn't got dovecot configured correctly. It turned out that I hadn't
changed the default line

protocols = none

in dovecot.conf. It should of course be

protocols = imap

(I guess I assumed that would be the default for a package called dovecot-imapd)

So it's all working now, and so far seems to be a massive improvement
over nnmaildir.

Dan

>
>>> I think you cannot say ~, because that will look into the "mail" (or
>>> "imap"?) users $HOME only.  To use the users home put a %u into the
>>> path.  (I didn't test that.  If it doesn't work, have a look at the
>>> docs.  The example dovecot.conf tells you how to do it in the
>>> comments above mail_location.)
>>
>> OK, good point, but I've now tried writing the path explicitly, and I
>> get the same error:
>>
>> mail_location = maildir:/home/dan/Maildir
>>
>> imap: Connecting to localhost...failed
>> nnimap (dc) open error: 'nil'.  Continue? (y or n) 
>> Couldn't open server on dc
>>
>> Maybe this is obviously true but I've just checked and dovecot's not
>> logging any messages when gnus tries to connect (I used dovecot
>> --log-error to check I can see error messages and turned on auth_verbose
>> and auth_debug and auth_debug_passwords).
>
> I think dovecot normally logs to the system logger.  So you should see
> any login attempt in /var/log/dovecot.log or whatever you specified as
> log_path in dovecot.conf.
>
> Bye,
> Tassilo



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: dovecot: imap: Connecting to localhost...failed
  2009-04-22  5:39       ` Dan Davison
@ 2009-04-22  7:03         ` Tassilo Horn
  0 siblings, 0 replies; 6+ messages in thread
From: Tassilo Horn @ 2009-04-22  7:03 UTC (permalink / raw)
  To: ding

Dan Davison <davison@stats.ox.ac.uk> writes:

Hi Dan,

> protocols = none

;-)  So you got what you've demanded.

> in dovecot.conf. It should of course be
[...]
> So it's all working now, and so far seems to be a massive improvement
> over nnmaildir.

Great to hear that, and I agree.

Bye,
Tassilo
-- 
Richard Stallman's left and right hands are named "(" and ")"



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-04-22  7:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-19 22:32 dovecot: imap: Connecting to localhost...failed Dan Davison
2009-04-20  7:17 ` Tassilo Horn
2009-04-20 15:01   ` Dan Davison
2009-04-20 15:16     ` Tassilo Horn
2009-04-22  5:39       ` Dan Davison
2009-04-22  7:03         ` Tassilo Horn

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).