0

The standard command "/etc/init.d/dovecot restart" has no effect on my Debian version 5.0.4 server running dovecot 1.1.0. Similarly /etc/init.d/dovecot stop has no effect. The dovecot logs do not show anything. The dovecot master.pid file is unchanged after the command and ps shows the same PID for dovecot.

I'm trying to get dovecot to reload its config file to listen on ports 110 and 995 to support MS Outlook clients who claim that they cannot change the POP3 port on outlook to use port 995. I don't have MS Outlook myself to confirm this.

I finally restarted the process by manually running start-stop-daemon with parameters copied from the init script. The restart is logged and master.pid is updated.

After restarting dovecot netstat shows that it is still listening on port 995 only. I have listen = 1.2.3.4:110, 1.2.3.4:995 in dovecot.conf.

  • 1
    What do you get when you execute the command? Any error? Any output? – Khaled Oct 30 '10 at 14:01
  • And check your logs! The contents of /var/log/mail.* (specifically .warn and .err) may be most relevant for your issue, although depending on what is at at fault, daemon.log and debug may also be revealing. – Zayne S Halsall Oct 30 '10 at 14:51
  • Do you mean "does not restart" as in Dovecot stops and does not start again? Or "does not restart" as in Dovecot is still running and didn't stop and start? If it stops and does not start again, will it start if you run `/etc/init.d/dovecot start`? – DerfK Oct 30 '10 at 15:21
  • The command produces no output. – Rob Borland Oct 31 '10 at 04:29
  • There is nothing useful in /var/log/dovecot/*.log. – Rob Borland Oct 31 '10 at 04:30
  • The command has no effect at all; similarly "/etc/init.d/dovecot stop" has no effect. The PID file "/var/run/dovecot/master.pid" remains unchanged. I'm trying to get dovecot to re-read the configuration file after making changes to get it to listen on ports 995 and 110. – Rob Borland Oct 31 '10 at 04:34
  • I finally ran "start-stop-daemon" manually with parameters copied from the init script. This restarted dovecot with a new PID and master.pid file. BUT dovecot is still not listening on 995 and 110 which was the reason for reloading the config file. I'm trying to support MS Outlook users. They report that they can't change ports from 110 to 995 (I don't have MS Outlook myself to confirm this). – Rob Borland Oct 31 '10 at 04:40
  • Can you post your dovecot.conf? Mine is carefully configured NOT to listen on port 110, so it's possible that yours is also. – MadHatter Oct 31 '10 at 06:55
  • http://dl.dropbox.com/u/8031871/dovecot.conf – Rob Borland Oct 31 '10 at 07:12
  • thanks, i guess that's not it, you have "protocols = pop3 pop3s imap imaps" as you should. If you'll forgive another fishing-expedition question, how do you know it's not listening on 110 after the restart? – MadHatter Oct 31 '10 at 07:49
  • I ran "netstat -an" and there is nothing listening on 110. I also tried connecting from a Windows XP client with Outlook Express configured to use port 110 and it fails. OE connects fine when configured to use port 995 and SSL. – Rob Borland Oct 31 '10 at 08:02
  • ok, that's pretty definitive. i don't suppose anything interesting turns up in wherever syslog sends mail.* and kernel.* to *at restart time*? – MadHatter Oct 31 '10 at 08:07
  • The restart is only logged in dovecot/info.log, not in syslog. (I'm still getting used to Debian style logging, only recently switched from RedHat.) – Rob Borland Oct 31 '10 at 08:17
  • Ummm. Then I guess I'm almost out of ideas. The hail-mary options are (a) you could try killing the old daemon with kill -15 / kill -9, to make sure it's really dead, and (b) you could make sure selinux isn't running, in case that's blocking anyone binding to 110. Sorry not to have better suggestions, but I agree that it looks like you're doing everything right. – MadHatter Oct 31 '10 at 08:23
  • Ok, killed the current daemon and started a new one with start-stop-daemon. Still doesn't listen on port 110. Thanks for the good suggestions. – Rob Borland Oct 31 '10 at 08:41
  • Oh yes, selinux is not installed. – Rob Borland Oct 31 '10 at 08:42
  • You could brute-force it, and try running the daemon under strace, and pipe through grep 110, see if it's trying to open the port and how it fails if so. – MadHatter Oct 31 '10 at 08:43
  • Sounds promising. I've never used strace before. I'd better RTFM first. I'm still trying to figure out the correct options for start-stop-daemon to cleanly stop and start dovecot. I have to leave the keyboard for a while. Thanks for your advice. – Rob Borland Oct 31 '10 at 09:02

2 Answers2

1

The init script should do nothing if dovecot is being run from inetd

have you something in /etc/inetd.conf ?

A M
  • 158
  • 8
  • oh, strong suggestion - that would also explain why it can't bind to 110, as (x)inetd will be holding the port open. wouldn't explain why he sees nothing under netstat, though. – MadHatter Oct 31 '10 at 10:08
  • pop3 stream tcp nowait root /usr/sbin/tcpd /usr/lib/dovecot/pop3-login pop3s stream tcp nowait root /usr/sbin/tcpd /usr/lib/dovecot/pop3-login – Rob Borland Oct 31 '10 at 16:25
  • Yes, I do have pop3 and pop3s defined in inetd.conf. I assume this is the default for the Debian package. I had assumed that this was run as a daemon. My priority is to get clients running MS Outlook supported. I'd appreciate your advice. Here are the lines from inetd.conf: pop3 stream tcp nowait root /usr/sbin/tcpd /usr/lib/dovecot/pop3-login pop3s stream tcp nowait root /usr/sbin/tcpd /usr/lib/dovecot/pop3-login – Rob Borland Oct 31 '10 at 16:30
  • I commented out the pop3 and pop3s lines in /etc/inetd.conf and restarted inetd then restarted dovecot as a daemon using /etc/init.d/dovecot. Now I can connect from an MS Outlook Express client configured to use port 110. Thanks for the advice. – Rob Borland Oct 31 '10 at 16:57
-1

yes, you cannot have ANY pop3 or imap mentioned anywhere in inetd.conf, even if openbsd-inetd* isnt installed, and even if the damn lines are commented out. it will silently NOT start with no logging of any kind. filing a bug, cuz that's ridiculous. (in squeeze, in wheezy there's a warning at last now, thank god.)

math
  • 230
  • 2
  • 9