Mike Brudenell
2006-May-12 12:29 UTC
[Dovecot] 1.0beta8 won't start: Fatal: Protocol imaps given more than once
Greetings -
I've just built Dovecot 1.0beta8 and find it refuses to start. This under
Solaris 10 on an Intel-based Sun system. The error message Dovecot
displays (on standard error) in response to
/usr/local/sbin/dovecot
is
Fatal: Protocol imaps given more than once
I've checked through my configuration file and the only mention of
"imaps"
is here:
# Protocols we want to be serving:
# imap imaps pop3 pop3s
protocols = imap imaps
The same settings file worked OK with 1.0beta7. I've also tried using the
standard dovecot-example.conf that comes with 1.0beta8 which has the
"protocols" line commented out and, after adding appropriate settings
for
"ssl_cert_file" and "ssl_key_file", still have the same
problem.
I popped a few dubugging i_info() calls into src/master/main.c to try and
see what was going on and the output was as follows:
Info: set->protocols = >imap imaps<
Info: imap: *fd = -1
Info: imaps: *fd = 0
Fatal: Protocol imaps given more than once
The first line is displaying the value of the keywords in set->protocols
The second and third are within the if/then/else sequence: the first for
the "imap" keyword and the second for the "imaps" keyword.
Then comes the fatal error, caused by the "fd" variable not being
equal to
-1 (it is "0" for "imaps") above.
Changing the dovecot.conf file to read
protocols = imap
lets Dovecot start up OK. Changing it to
protcols = imaps
causes it to fail in the same way as before(!).
Seems to be a problem with the initialisation of set->ssl_listen_fd
therefore, as this should apparently be -1? Is this likely to be something
I've got wrong (wouldn't have thought so as 1.0beta7 is happy with the
same
config file) or is there a problem in 1.0beta8?
Cheers,
Mike B-)
--
The Computing Service, University of York, Heslington, York Yo10 5DD, UK
Tel:+44-1904-433811 FAX:+44-1904-433740
* Unsolicited commercial e-mail is NOT welcome at this e-mail address. *
Mike Brudenell
2006-May-12 12:35 UTC
[Dovecot] 1.0beta8 won't start: Fatal: Protocol imaps given more than once
Footnote... --On 12 May 2006 13:29:10 +0100 Mike Brudenell <pmb1 at york.ac.uk> wrote:> Seems to be a problem with the initialisation of set->ssl_listen_fd > therefore, as this should apparently be -1? Is this likely to be > something I've got wrong (wouldn't have thought so as 1.0beta7 is happy > with the same config file) or is there a problem in 1.0beta8?Looks like my problem may lie in src/master/main.c here: #ifdef HAVE_SSL set->ssl_listen_port = set->protocol == MAIL_PROTOCOL_IMAP ? 993 : 995; #else set->ssl_listen_port = 0; #endif Yet HAVE_SSL is definitely defined in config.h -- I've just checked yet again! If anyone has any ideas I'd be grateful, otherwise I'll pursue it further after lunch. Cheers, Mike B-) -- The Computing Service, University of York, Heslington, York Yo10 5DD, UK Tel:+44-1904-433811 FAX:+44-1904-433740 * Unsolicited commercial e-mail is NOT welcome at this e-mail address. *
Timo Sirainen
2006-May-12 13:00 UTC
[Dovecot] 1.0beta8 won't start: Fatal: Protocol imaps given more than once
On Fri, 2006-05-12 at 13:29 +0100, Mike Brudenell wrote:> Info: set->protocols = >imap imaps< > Info: imap: *fd = -1 > Info: imaps: *fd = 0 > Fatal: Protocol imaps given more than onceOK, I guess you didn't compile with C99-compatible C compiler. The problem is that Dovecot fallbacks to old way of initializing structs, and looks like I've been lazy and not keeping them working properly. Attached patch should fix it. -------------- next part -------------- A non-text attachment was scrubbed... Name: c89-fix.diff Type: text/x-patch Size: 1333 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20060512/810b9599/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20060512/810b9599/attachment-0001.bin>