Chris Evans
2013-Jan-05 15:48 UTC
[Dovecot] Problem setting up dovecot on Debian: "telnet: Unable to connect to remote host: Connection refused"
I would like to get dovecot running on my laptop so I can transfer a lot of old Email from Thunderbird mailbox files to a hosted zimbra service. However I'm falling at the first hurdle. I'm running Debian squeeze i386 (kernel 2.6.32-5-686) and have installed dovecot-imapd and dovecot-common with synaptic and edited /etc/dovecot/dovecot.conf to make sure it has the right protocols and listen instructions. Here's dovecot -n root at delldeb:/etc/dovecot# dovecot -n # 1.2.15: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-686 i686 Debian 6.0.6 log_timestamp: %Y-%m-%d %H:%M:%S listen: 143 993 disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_privileged_group: mail mbox_write_locks: fcntl dotlock auth default: passdb: driver: pam userdb: driver: passwd Here's ps: root at delldeb:/etc/dovecot# ps aux | grep dove root 10353 0.0 0.0 3944 792 ? Ss 15:32 0:00 /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf root 10356 0.0 0.0 10008 2420 ? S 15:32 0:00 dovecot-auth root 10360 0.0 0.0 10008 2372 ? S 15:32 0:00 dovecot-auth -w dovecot 10361 0.0 0.0 5412 2024 ? S 15:32 0:00 imap-login dovecot 10362 0.0 0.0 5412 2024 ? S 15:32 0:00 imap-login dovecot 10363 0.0 0.0 5412 2028 ? S 15:32 0:00 imap-login root 10393 0.0 0.0 3304 772 pts/2 S+ 15:33 0:00 grep dove Here's netstat: root at delldeb:/etc/dovecot# netstat -tap | grep 143 tcp 0 0 0.0.0.143:imap2 *:* LISTEN 9178/dovecot tcp 0 0 0.0.0.143:imaps *:* LISTEN 9178/dovecot I can telnet into SMTP OK with telnet localhost 25 but telnet localhost 143 gets me the "Connection refused" message. I've changed auth_debug to "yes" and now /var/log/mail.info says: Jan 5 15:32:13 delldeb dovecot: Dovecot v1.2.15 starting up (core dumps disabled) Jan 5 15:32:14 delldeb dovecot: auth(default): new auth connection: pid=10361 Jan 5 15:32:14 delldeb dovecot: auth(default): new auth connection: pid=10362 Jan 5 15:32:14 delldeb dovecot: auth(default): new auth connection: pid=10363 That doesn't change after I try the telnet login again so I think that's just telling me that the dovecot daemon started and launched it's listeners (but I know I don't know how to read this so correction welcome). My reading of all of this is that the dovecot daemon is up and running, that it's listening correctly on 143 and 993 and that I have to do something else to get authorisation even to start the IMAP dialogue with the server. I would like to get it working and locked to SSL only but thought I should start with both unencrypted and encrypted. Can someone help me or point me to the bits of documentation or good web howto or the like that I've missed? TIA, Chris (long term Debian user but it's some years since I last ran my own mail server and I'm a total newby to imap and dovecot)
Reindl Harald
2013-Jan-05 16:01 UTC
[Dovecot] Problem setting up dovecot on Debian: "telnet: Unable to connect to remote host: Connection refused"
Am 05.01.2013 16:48, schrieb Chris Evans:> root at delldeb:/etc/dovecot# ps aux | grep dove > root 10353 0.0 0.0 3944 792 ? Ss 15:32 0:00 /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf > root 10356 0.0 0.0 10008 2420 ? S 15:32 0:00 dovecot-auth > root 10360 0.0 0.0 10008 2372 ? S 15:32 0:00 dovecot-auth -w > dovecot 10361 0.0 0.0 5412 2024 ? S 15:32 0:00 imap-login > dovecot 10362 0.0 0.0 5412 2024 ? S 15:32 0:00 imap-login > dovecot 10363 0.0 0.0 5412 2028 ? S 15:32 0:00 imap-login > root 10393 0.0 0.0 3304 772 pts/2 S+ 15:33 0:00 grep dove > > Here's netstat: > root at delldeb:/etc/dovecot# netstat -tap | grep 143 > tcp 0 0 0.0.0.143:imap2 *:* LISTEN 9178/dovecot > tcp 0 0 0.0.0.143:imaps *:* LISTEN 9178/dovecot > > I can telnet into SMTP OK with telnet localhost 25 but telnet localhost 143 gets me the "Connection refused"as you can see you daemon ist listening on IP 0.0.0.143 instead 0.0.0.0 1.2.x is really really old but i think you missunderstood a listen-option listen: 143 993 seems to be translated to 0.0.0.143, means you specified the ADDRESS the daemon should listen to instead the port root at delldeb:/etc/dovecot# dovecot -n # 1.2.15: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-686 i686 Debian 6.0.6 log_timestamp: %Y-%m-%d %H:%M:%S listen: 143 993 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20130105/540d2e7a/attachment-0004.bin>
Chris Evans
2013-Jan-05 17:16 UTC
[Dovecot] Problem setting up dovecot on Debian: "telnet: Unable to connect to remote host: Connection refused"
[SOLVED] - thanks to Harald Reindl - [SOLVED] ----- Original Message -----> From: "Reindl Harald" <h.reindl at thelounge.net> > To: dovecot at dovecot.org > Sent: Saturday, 5 January, 2013 4:01:09 PM > Subject: Re: [Dovecot] Problem setting up dovecot on Debian: "telnet: Unable to connect to remote host: Connection > refused"... some snipped ...> as you can see you daemon ist listening on IP 0.0.0.143 instead > 0.0.0.0 > > 1.2.x is really really oldAha. That's the version that's packaged for Debian squeeze. I assume that's OK for now. I'm not planning to keep it running long.> but i think you missunderstood a listen-option > > listen: 143 993 > seems to be translated to 0.0.0.143, means you specified > the ADDRESS the daemon should listen to instead the portAargh!! Idiot me: and the answer was there staring me in the face. OK. Sorted! I think I may be back to the list with questions about the best simple way to authenticate logging in. Is there an obvious guide? The documentation that comes with the Debian package seems pretty minimal. I'm just looking to switch on only the encrypted listening on 993 and then use a plain text password. But I'm getting off this thread which is closed and solved. [SOLVED] - thanks to Harald Reindl - [SOLVED] Very best to all whose inboxes were burdened! Chris
Joseph Tam
2013-Jan-07 23:43 UTC
[Dovecot] Problem setting up dovecot on Debian: "telnet: Unable to connect to remote host: Connection refused"
Noel Butler writes:> I build from sources all key daemon software anyway, package maintainers > can only account for so many configurations. Its not so critical with > dovecot now since v2, because, regrettably, Timo removed a lot of fine > tune config options that allowed us to only build in what we wanted, > now, tuff, most the auth methods and stuff must be built even if we dont > want them.That hasn't been my experience, but maybe because the non-optional stuff are what I need. For example, my configure for v2.1.x summarizes Install prefix . : /opt/dovecot File offsets ... : 64bit I/O polling .... : poll I/O notifys .... : none SSL ............ : yes (OpenSSL) GSSAPI ......... : no passdbs ........ : static passwd passwd-file checkpassword : -shadow -pam -bsdauth -sia -ldap -sql -vpopmail userdbs ........ : static prefetch passwd passwd-file checkpassword : -ldap -sql -vpopmail -nss SQL drivers .... : : -pgsql -mysql -sqlite Full text search : squat : -lucene -solr A few auth methods, which even if you don't use, is a nice fallback for exceptions or niche caches, no dbs, one mandatory text search method. Joseph Tam <jtam.home at gmail.com>