Open sagepe opened 5 years ago
Hmm, I was thinking of this as a bug, but actually, isn't this a good thing? What should happen if we get the credentials wrong?
Well, clearly we need to raise an exception of some form but a crash seems a bit extreme to me - surely it's better to handle known error conditions more gracefully?
In this case, the reason it failed was transient; the system as a whole would have become consistent in due course so subsequent poller runs would have started succeeding - but because the daemon had crashed, they stopped taking place until the daemon was restarted.
I notice there are regular cron jobs for some of the vhosts that use the poller to check and restart the daemon. This workaround may be acceptable for the time being, but we should reduce our reliance on cron and either eliminate the crashes where we can or use a better tool for process management.
Getting to #2523 would offer us another way of dealing with this in terms of more robust process management as this is something systemd
handles. There are other options (such as running processes like this in a container) but exploring all these is probably out of scope for this ticket.
If POP authentication fails, the mail poller crashes: