Discussion:
[Dovecot] Simply can't figure it out
Gaby vanhegan
2005-05-24 03:47:57 UTC
Permalink
Hi,

I'm having a hideous problem trying to get the latest stable version to
work. I've had no success and simply can't pinpoint the problem.
Sorry for the rather long email but I've included as many details as I
can to help here.

I've been trying to install the latest stable version (as of 23rd May
2005) by downloading the tarball from the site to my OpenBSD 3.6 box,
and building with these arguments:

# ./configure --localstatedir=/var --with-ssl=openssl
--with-ssldir=/etc/ssl --without-vpopmail -
-without-pam --without-shadow

Which builds fine. Here are some files from the installation folder:

http://vanhegan.net/dovecot/config.log
http://vanhegan.net/dovecot/config.status

Here's my configuration file. I only really want to server imaps, but
I've turned on imap for debuggering purposes:

http://vanhegan.net/dovecot/dovecot.conf

And it's running from my inetd.conf:

# Dovecot IMAP services
144 stream tcp nowait root
/usr/local/libexec/dovecot/imap-login imap-login --group=default/imap
imaps stream tcp nowait root
/usr/local/libexec/dovecot/imap-login imap-login --group=default/imap
--ssl

(I'm running on port 144 to not clash with the existing IMAP service on
port 143). Now, no matter what I try, I simply can't make it login, or
start the process:

(restart inetd, dovecot, check they're dead)
bash-3.00# kill -HUP `cat /var/run/inetd.pid`
bash-3.00# kill -TERM `cat /var/run/dovecot/master.pid`
bash-3.00# ps auwx | grep dove
root 828 0.0 0.1 84 456 p2 S+ 8:39PM 0:00.01 grep
dove
bash-3.00# /usr/local/libexec/dovecot/imap-login --group=default/imap
F/usr/local/libexec/dovecot/imap-login can be started only through
dovecot master process, inetd or equilevant

(start dovecot, check it's running, error expected, other imap server
already running)
bash-3.00# /usr/local/sbin/dovecot
Fatal: listen(143) failed: Address already in use
bash-3.00# ps auwx | grep dove
root 14041 0.0 0.3 212 1012 ?? Ss 8:39PM 0:00.06
dovecot
root 3496 0.0 0.2 276 608 ?? S 8:39PM 0:00.02
dovecot-auth
root 10928 0.0 0.1 104 456 p2 S+ 8:40PM 0:00.01 grep
dove

(try and login)
bash-3.00# /usr/local/libexec/dovecot/imap-login --group=default/imap
Fatal: EOF while reading environment from master
bash-3.00# tail /var/log/dovecot
dovecot: May 23 20:34:19 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:35:06 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:37:00 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:37:04 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:37:07 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:37:07 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:37:07 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:38:57 Warning: Killed with signal 15
dovecot: May 23 20:39:39 Info: Dovecot v1.0-stable starting up
dovecot: May 23 20:40:25 Error: login: Unknown protocol 'imap?W'

(try an SSL login)
bash-3.00# openssl s_client -connect localhost:993
CONNECTED(00000004)
24195:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown
protocol:/usr/src/lib/libssl/ssl/../src/ssl/s23_clnt.c:475:
bash-3.00# tail /var/log/dovecot
dovecot: May 23 20:35:06 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:37:00 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:37:04 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:37:07 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:37:07 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:37:07 Error: login: Missing protocol from server
name 'imap'
dovecot: May 23 20:38:57 Warning: Killed with signal 15
dovecot: May 23 20:39:39 Info: Dovecot v1.0-stable starting up
dovecot: May 23 20:40:25 Error: login: Unknown protocol 'imap?W'
dovecot: May 23 20:44:20 Error: login: Unknown protocol 'imap?W'

HELP PLEASE!!! I've scoured t'internet and the closest I can find is
this:

http://dovecot.org/pipermail/dovecot/2005-February/006284.html

Which got me past the "missing protocol from server" problem but hasn't
got anywhere. I've since fallen back to the version in ports from
OpenBSD 3.6 but really want to get this going. Any ideas?

Gaby

--
Junkets for bunterish lickspittles since 1998!
***@vanhegan.net
http://weblog.vanhegan.net
Tero Ripattila
2005-05-24 04:12:58 UTC
Permalink
Hello Gaby,
Post by Gaby vanhegan
I've been trying to install the latest stable version (as of 23rd May
2005) by downloading the tarball from the site to my OpenBSD 3.6 box,
I'm running OpenBSD too. -test70 is only release that I've had serious
problems with, others have worked like a charmn.
Post by Gaby vanhegan
# ./configure --localstatedir=/var --with-ssl=openssl
# --with-ssldir=/etc/ssl --without-vpopmail -
-without-pam --without-shadow
We seem to build the binaries in very similar way. This is how I build
mine:

$ ./configure --with-pgsql --with-mysql --with-ldap --without-pam
--without-vpopmail --without-shadow --localstatedir=/var/dovecot
--sysconfdir=/etc/dovecot --with-ssldir=/etc/ssl --with-ssl=openssl
Post by Gaby vanhegan
Here's my configuration file. I only really want to server imaps,
Personally I run dovecot outside the inetd.
Post by Gaby vanhegan
bash-3.00# /usr/local/sbin/dovecot
Fatal: listen(143) failed: Address already in use
I think the problem is here, because you already have an installation
that listens the port 143.

What you should do here is modify dovecot.conf on line 28 and define an
alternative port there e.g.

listen = 127.0.0.1:144
Post by Gaby vanhegan
dovecot: May 23 20:34:19 Error: login: Missing protocol from server
name 'imap'
Not sure what this error message means, but one idea that came to my
mind is that you have no protocol called "imap" specified in
/etc/services file. This is just an guess thought. Here's what I got
there:

$ grep imap /etc/services
imap 143/tcp imap2 # Internet Message Access Proto
imap 143/udp imap2 # Internet Message Access Proto
imap3 220/tcp # Interactive Mail Access
imap3 220/udp # Protocol v3
imaps 993/tcp # imap4 protocol over TLS/SSL
imaps 993/udp # imap4 protocol over TLS/SSL
Post by Gaby vanhegan
http://vanhegan.net/dovecot/dovecot.conf
Is this .conf file really the one you're using to run dovecot as it
Post by Gaby vanhegan
dovecot: May 23 20:40:25 Error: login: Unknown protocol 'imap?W'
You got extra characters like "?" and "W" after the word imap - at
least that's what I can read from your error log.

Thought I cannot see these extra characters in your dovecot.conf so I'm
wondering if these configuration files really are the same. See line 19:

protocols = imap imaps

Thanks, Tero
--
Tero Ripattila
Rob B
2005-05-24 13:01:47 UTC
Permalink
Post by Gaby vanhegan
bash-3.00# /usr/local/sbin/dovecot
Fatal: listen(143) failed: Address already in use
I think the problem is here, because you already have an installation that
listens the port 143.
You can use "netstat -af inet" to see what applications have ports open.

cheers,
Rob
--
If she doesn't scare ya, no evil thing will...

This is random quote 669 of 1268.
Gaby vanhegan
2005-05-24 19:06:19 UTC
Permalink
Post by Rob B
Post by Tero Ripattila
Post by Gaby vanhegan
bash-3.00# /usr/local/sbin/dovecot
Fatal: listen(143) failed: Address already in use
I think the problem is here, because you already have an installation
that listens the port 143.
You can use "netstat -af inet" to see what applications have ports open.
I know that I have an existing IMAP server running on port 143, but
even when I limit dovecot to just using port 993 and running an ssl
service, I still get the same problems.

Gaby

--
Junkets for bunterish lickspittles since 1998!
***@vanhegan.net
http://weblog.vanhegan.net
Timo Sirainen
2005-05-24 05:14:23 UTC
Permalink
Post by Gaby vanhegan
I've been trying to install the latest stable version (as of 23rd May
2005) by downloading the tarball from the site to my OpenBSD 3.6 box,
..
It's not working from inetd. Too many bugs with it and I don't see it
being that useful compared to running it standalone.

I'm not sure if I already fixed it in 1.0-test releases. If not, I'll
do it after master process rewrite (which is semi-working nowadays
btw.).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20050524/b540a2df/PGP-0001.pgp
Gaby vanhegan
2005-05-25 01:50:51 UTC
Permalink
Post by Timo Sirainen
Post by Gaby vanhegan
I've been trying to install the latest stable version (as of 23rd May
2005) by downloading the tarball from the site to my OpenBSD 3.6 box,
..
It's not working from inetd. Too many bugs with it and I don't see it
being that useful compared to running it standalone.
I'm not sure if I already fixed it in 1.0-test releases. If not, I'll
do it after master process rewrite (which is semi-working nowadays
btw.).
Would you recommend that I try running the latest test 1.0-test version
standalone? Is there any way I can increase the level of debug beyond
that in the dovecot.cont?

Gaby

--
Junkets for bunterish lickspittles since 1998!
***@vanhegan.net
http://weblog.vanhegan.net
Tero Ripattila
2005-05-25 04:57:47 UTC
Permalink
Hello Gaby,
Post by Gaby vanhegan
Would you recommend that I try running the latest test 1.0-test version
standalone?
Yep, that's actually what I've been doing for six months now in an production environment and approx. a year in a test one. I can tell that it have worked very well, exluding of course these problems I've had with -test70.
Post by Gaby vanhegan
Is there any way I can increase the level of debug beyond
that in the dovecot.cont?
You may want to have a look Dovecot's rawlog feature, please see <http://www.dovecot.org/bugreport.html>:
You can also make Dovecot save the traffic to user's ~/dovecot.rawlog directory. That requires configuring Dovecot --with-rawlog option and creating the ~/dovecot.rawlog directory. All the user's traffic is saved to yyymmdd-hhmiss-pid.in and .out files. The files may also contain * TIMESTAMP lines. They don't actually belong to the traffic, but they're inserted when connection is used again after it has been idle for some time. They're useful for figuring out when something happened with long running connections.

I'd also suggest that you have a look of the available dovecot.conf options too as they're rather useful:
verbose_ssl = yes

mail_debug = yes

auth_verbose = yes
auth_debug = yes

An in case you need to be able to let Dovecot do core dumps, set
mail_drop_priv_before_exec = yes

Thanks, Tero
--
Tero Ripattila
Loading...