[Dovecot] login: Missing protocol from server name 'imap'
I also tried the 0.99 and hacking login-process.c, with no success. It seems to expect a slash delimited string like 'name/protocol' and it just gets "imap" there, but I didn't figure out where this string comes from or what it ought to be.
So I would be grateful if someone could enlighten me.
Thanks, Peter
Some blafa: Feb 17 21:45:44 office dovecot: Dovecot v1.0-test59 starting up Feb 17 21:45:44 office dovecot: login: Missing protocol from server name 'imap'
Linux office 2.4.20-64GB-SMP #1 SMP Fri Jan 14 15:08:48 UTC 2005 i686 unknown unknown GNU/Linux
Client: Mozilla Thunderbird 1.0 (20041206) IMAPS port 993
Dovecot Started by xinetd:
# # imaps - imap mail daemon over ssl # service imaps { disable = no socket_type = stream protocol = tcp wait = no user = root server = /usr/libexec/dovecot/imap-login server_args = --ssl flags = IPv4 }
Peter Franck wrote:
I also tried the 0.99 and hacking login-process.c, with no success. It seems to expect a slash delimited string like 'name/protocol' and it just gets "imap" there, but I didn't figure out where this string comes from or what it ought to be.
IIRTCC, the string comes from login-common/main.c:master_connect(), which is called from login-common/main.c:main(), where it's constructed by taking the filename component of the executable ("imap-login") and removing the part after the hyphen (yielding "imap"). Since the filename component can't contain a slash, this looks like a slight oversight when changing the the configuration format.
You can use the --group= parameter to give imap-login what the master process wants ("default/imap", I guess).
-- Magnus Holmgren
Magnus Holmgren wrote:
Peter Franck wrote:
I also tried the 0.99 and hacking login-process.c, with no success. It seems to expect a slash delimited string like 'name/protocol' and it just gets "imap" there, but I didn't figure out where this string comes from or what it ought to be.
IIRTCC, the string comes from login-common/main.c:master_connect(), which is called from login-common/main.c:main(), where it's constructed by taking the filename component of the executable ("imap-login") and removing the part after the hyphen (yielding "imap"). Since the filename component can't contain a slash, this looks like a slight oversight when changing the the configuration format.
You can use the --group= parameter to give imap-login what the master process wants ("default/imap", I guess).
Attaching suggested patch. With it, the default server name ("default") is assumed by the master process if the string sent by the login process doesn't contain any slash. If you have multiple server blocks in your configuration (undocumented feature as of yet, it appears!), you still need to add --group=<server>/<protocol> to the parameters of imap-login/pop3-login in your inetd/xinetd configuration. (You could for example have different configurations for different interfaces, if I understand it correctly.) Two comments on the patch: The first change is because I suspect buf isn't null-terminated. The last deletion (of "name = ...") is because I believe that line to be superfluous. -- Magnus Holmgren holmgren@lysator.liu.se --- src/master/login-process.c.orig 2005-02-19 22:24:16.000000000 +0100 +++ src/master/login-process.c 2005-02-19 22:56:00.000000000 +0100 @@ -192,13 +192,14 @@ i_error("login: Server name wasn't sent"); else { name = t_strndup(buf, len); - proto = strchr(buf, '/'); + proto = strchr(name, '/'); if (proto == NULL) { - i_error("login: Missing protocol from server name '%s'", - name); - return FALSE; + proto = name; + name = "default"; } - name = t_strdup_until(buf, proto++); + else { + *proto++ = '\0'; + } if (strcmp(proto, "imap") == 0) protocol = MAIL_PROTOCOL_IMAP;
Magnus Holmgren wrote:
Magnus Holmgren wrote:
Peter Franck wrote:
I also tried the 0.99 and hacking login-process.c, with no success. It seems to expect a slash delimited string like 'name/protocol' and it just gets "imap" there, but I didn't figure out where this string comes from or what it ought to be.
IIRTCC, the string comes from login-common/main.c:master_connect(), which is called from login-common/main.c:main(), where it's constructed by taking the filename component of the executable ("imap-login") and removing the part after the hyphen (yielding "imap"). Since the filename component can't contain a slash, this looks like a slight oversight when changing the the configuration format.
You can use the --group= parameter to give imap-login what the master process wants ("default/imap", I guess).
Attaching suggested patch. With it, the default server name ("default") is assumed by the master process if the string sent by the login process doesn't contain any slash. If you have multiple server blocks in your configuration (undocumented feature as of yet, it appears!), you still need to add --group=<server>/<protocol> to the parameters of imap-login/pop3-login in your inetd/xinetd configuration.
(You could for example have different configurations for different interfaces, if I understand it correctly.)
Two comments on the patch: The first change is because I suspect buf isn't null-terminated. The last deletion (of "name = ...") is because I believe that line to be superfluous.
Thanks, Magnus!
That was the bit I was missing since I'm trying out dovecot for the very first time.
Unfortunately I have one more (newbie) problem : I am now able to authenticate against dovecot, but i cannot get any mail from it.
Logfile:
---8<--- Feb 20 00:31:20 office dovecot: auth(default): client in: AUTH 1 PLAIN service=IMAP secured lip=192.168.23.1 rip=192.168.23.42 Feb 20 00:31:20 office dovecot: auth(default): client out: CONT 1 Feb 20 00:31:20 office dovecot: auth(default): client in: CONT 1 AHZpYwBzeXNpbnQyMQ== Feb 20 00:31:20 office dovecot: auth(default): client out: OK 1 user=vic Feb 20 00:31:20 office dovecot: auth(default): master in: REQUEST 1 2 1 Feb 20 00:31:20 office dovecot: auth(default): Master requested auth for nonexisting client 2 Feb 20 00:31:39 office dovecot: auth(default): client in: AUTH 1 PLAIN service=IMAP secured lip=192.168.23.1 rip=192.168.23.42 Feb 20 00:31:39 office dovecot: auth(default): client out: CONT 1 Feb 20 00:31:39 office dovecot: auth(default): client in: CONT 1 AHZpYwBzeXNpbnQyMQ== Feb 20 00:31:39 office dovecot: auth(default): client out: OK 1 user=vic Feb 20 00:31:39 office dovecot: auth(default): master in: REQUEST 2 3 1 Feb 20 00:31:39 office dovecot: auth(default): Master requested auth for nonexisting client 3 Feb 20 00:31:39 office dovecot: auth(default): client in: AUTH 1 PLAIN service=IMAP secured lip=192.168.23.1 rip=192.168.23.42 Feb 20 00:31:39 office dovecot: auth(default): client out: CONT 1 Feb 20 00:31:39 office dovecot: auth(default): client in: CONT 1 AHZpYwBzeXNpbnQyMQ== Feb 20 00:31:39 office dovecot: auth(default): client out: OK 1 user=vic Feb 20 00:31:39 office dovecot: auth(default): master in: REQUEST 3 4 1 Feb 20 00:31:39 office dovecot: auth(default): Master requested auth for nonexisting client 4 Feb 20 00:31:44 office dovecot: auth(default): client in: AUTH 1 PLAIN service=IMAP secured lip=192.168.23.1 rip=192.168.23.42 Feb 20 00:31:44 office dovecot: auth(default): client out: CONT 1 Feb 20 00:31:44 office dovecot: auth(default): client in: CONT 1 AHZpYwBzeXNpbnQyMQ== Feb 20 00:31:44 office dovecot: auth(default): client out: OK 1 user=vic Feb 20 00:31:44 office dovecot: auth(default): master in: REQUEST 4 5 1 Feb 20 00:31:44 office dovecot: auth(default): Master requested auth for nonexisting client 5 --->8---
Any idea? Peter
(BTW is there a search index over the mailing list archives somewhere? Google doesn't know its contents)
Peter Franck wrote:
Magnus Holmgren wrote:
Magnus Holmgren wrote:
You can use the --group= parameter to give imap-login what the master process wants ("default/imap", I guess).
Thanks, Magnus!
Glad to be of help!
That was the bit I was missing since I'm trying out dovecot for the very first time.
Unfortunately I have one more (newbie) problem : I am now able to authenticate against dovecot, but i cannot get any mail from it.
Logfile:
---8<--- Feb 20 00:31:20 office dovecot: auth(default): client in: AUTH 1 PLAIN service=IMAP secured lip=192.168.23.1 rip=192.168.23.42 Feb 20 00:31:20 office dovecot: auth(default): client out: CONT 1
Feb 20 00:31:20 office dovecot: auth(default): client in: CONT 1 AHZpYwBzeXNpbnQyMQ== Feb 20 00:31:20 office dovecot: auth(default): client out: OK 1
user=vic Feb 20 00:31:20 office dovecot: auth(default): master in: REQUEST
1 2 1 Feb 20 00:31:20 office dovecot: auth(default): Master requested auth for nonexisting client 2 --->8---Any idea? Peter
Did you upgrade from 1.0-test59 to 1.0-test62 (or possibly 61 or 60) between your posts? I hope you haven't mixed binaries from different versions, since that might cause strange errors.
(BTW is there a search index over the mailing list archives somewhere? Google doesn't know its contents)
I have no problem googling through http://dovecot.org/list/dovecot/. And there's also the IMAP archive at imap://anonymous@dovecot.org.
Chiao Magnus
Magnus Holmgren wrote: [...]
Unfortunately I have one more (newbie) problem : I am now able to authenticate against dovecot, but i cannot get any mail from it.
Logfile:
---8<--- Feb 20 00:31:20 office dovecot: auth(default): client in: AUTH 1 PLAIN service=IMAP secured lip=192.168.23.1 rip=192.168.23.42 Feb 20 00:31:20 office dovecot: auth(default): client out: CONT 1
Feb 20 00:31:20 office dovecot: auth(default): client in: CONT 1 AHZpYwBzeXNpbnQyMQ== Feb 20 00:31:20 office dovecot: auth(default): client out: OK 1
user=vic Feb 20 00:31:20 office dovecot: auth(default): master in: REQUEST
1 2 1 Feb 20 00:31:20 office dovecot: auth(default): Master requested auth for nonexisting client 2 --->8---Any idea? Peter
Did you upgrade from 1.0-test59 to 1.0-test62 (or possibly 61 or 60) between your posts? I hope you haven't mixed binaries from different versions, since that might cause strange errors.
I am running 1.0-test62, compiled from distclean source plus Magnus´ patch. I have cross-checked all binaries once more. They all bear the same timestamp.
One interesting thing to note is that my Thunderbird client opens up to 8 simultaneous imap sessions if used with uw-imapd.
Dovecot generates one more entry like the above in the mail log whenever i click on a mail or a folder within Thunderbird.
It might be that the uw-imapd directory structure is not compatible with dovecot but I would expect (a) that it will find at least the inbox at /var/[spool/]mail/$LOGNAME and (b) a different error message if this is the problem.
Still no success, Peter
participants (3)
-
Johannes Berg
-
Magnus Holmgren
-
Peter Franck