zieren / eltern-emailer

Unofficial email interface for *.eltern-portal.org and schulmanager-online.de.
https://zieren.de/software/eltern-emailer
GNU General Public License v3.0
3 stars 2 forks source link

IMAP reconnect may be required on errors other than ECONNRESET #33

Closed zieren closed 1 year ago

zieren commented 1 year ago

This error also puts IMAP out of commission:

2023-01-28T17:14:59.157Z error: IMAP: {"src":"s","msg":"Server Unavailable. 15","err":{},"cid":"34oplssdfts0qdcob05k"}
2023-01-28T17:14:59.177Z warn: IMAP: {"err":{},"cid":"34oplssdfts0qdcob05k"}
2023-01-28T17:14:59.179Z warn: IMAP: {"err":{},"cid":"34oplssdfts0qdcob05k"}

It seems we should also trigger a reconnect in this case. There is no proper error code, so maybe just list errors for which we do not restart, like wrong password or server not found?

zieren commented 1 year ago

Note that this error is not emitted as an event, but only to the error logger. It does, however, disable the IMAP check, so it does require a restart.