On 1.9.2012, at 11.10, David Anderson wrote: > I've not found the answer to this question anywhere - please forgive me if I > overlooked. > > I'd like to be able to be automatically alerted if process limits are hit > (e.g. max POP3 logins). > > Is there a way that I can configure a script to be run, in the same way that > I can with quota warnings? > > I can of course use logwatch, but this alerts me the next day, and logwatch > can be noisy and it's easy to overlook.
Log errors/warnings to a separate file and watch it. Dovecot's error/warning log typically stays completely empty (except when stopping Dovecot). Anything you find there is a potential error.. > My motivation: for some reason my POP3 listener was hanging, and I had to > restart dovecot (this is 2.0.9). But I was not aware - the process was still > there, it was accepting connections (but not doing anything useful with them) > and was actually managing to log the fact that the process limit was being > hit (as more and more connections came in). If I could have been alerted I > could have restarted dovecot earlier. Restarting is kind of a kludgy solution, since the only thing it does is to kill all the existing connections and hope that they don't immediately just reconnect back. An equivalent fix is doveadm kick '*'