Catch and move on from socket errors in imapd and smtpd