Your comments

Just a follow-up this was caused by nginx trying to bind to an ipv6 address prior to it being available. I added :

Restart=on-failure

RestartSec=5

To my systemd service file for nginx and that resolved the problem.

Same issue here and this fix resolved the issue. At least until I update courier. Is there a way to fix without needing to modify this script?