lmtpd: restart of the database server breaks the running process
The problem is basically the same as #711 (closed).
But the fix used at that time needed a rework in 63a3130c (due to issues with the upgrade to Django v3.x). Sadly this rework seems to cause the return of that older issue.