[Dovecot] login: Missing protocol from server name 'imap'
Magnus Holmgren
holmgren at lysator.liu.se
Sun Feb 20 00:28:03 EET 2005
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 at lysator.liu.se
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: login-process.c.patch
URL: <http://dovecot.org/pipermail/dovecot/attachments/20050219/6b49824e/attachment-0001.pl>
More information about the dovecot
mailing list