Can I set /etc/init.d/dovecot force-reload to auto start dovecot in system monitor?

I am having problems with dovecot…it regularly goes down. I am already discussing that on a different thread, however, often when dovecot is down, a simple systemctl start dovecot wont work because it has often failed with an error code.

so, if i were to instead use the command “/etc/init.d/dovecot force-reload” in the system status monitor (to automatically restart dovecot if the monitor detects it is down), will that command work if there are still running processes that wont let dovecot start using the “systemctl start dovecot” method because it has entered a failed state?

No. A restart would be more reasonable than start. (force-reload is not useful in any case.)

But, I don’t really recommend approaching the problem this way…figuring out why it is failing is a better choice. Dovecot is absurdly stable. It never crashes. If yours is crashing, something is wrong with your system (either hardware or something software that we haven’t looked at yet).

Having it restarted when it may be a status detection error could lead to more/worse problems. As it currently stands, I think it’s detecting wrong, not failing. Adding more moving parts is just gonna make it worse.

Oh, wait! You said /etc/init.d/dovecot force-reload! Don’t even touch that. That should never be used for anything in a systemd system.

yikes, and i was just about to add it to webmin>others>System and server status>Edit monitor>Dovecot

So what command can i use that will ensure that dovecot will restart no matter what dovecot pid’s are still active? Is “systemctl restart dovecot” enough?

  1. i just need something that ensures that if dovecot goes down during the night (or when i am off flying my powered paraglider or whatever), it will at least restart!

Currently as soon as i perform a complete system shutdown and restart the problem is going away for almost the entire day…i still cannot say what is triggering this problem but Im almost positive it has something to do with SSL certificate settings (either i have inadvertantly copied one to a place where it should not be copied, i cant be sure)

  1. Is it possible that if someone were trying to take out my server, and i dont have enough dovecot processes available, this could cause this problem? I think i saw a message somewhere where it said that i had 2 dovecot processes for one of the virtual servers.

Where do i check and change this?

I worry you’re making managing Dovecot way too complicated. It is not a service you have to babysit. Just get rid of the initscript, and stop poking the bear. Most folks go their whole lives without worrying about whether Dovecot is running…I can’t see any reason yours should be different. If you add more things that can break it, we may never know the actual cause.

You don’t. This isn’t something you need to micromanage.

ok…i will leave that as is. :+1:

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.