However, if I reboot the first 30 queued emails are sent then the rest gets stuck again.
I have diverted outgoing mail to a different route so the queue is not growing.
But with 2000 emails stuck I'd need to reboot another 67 times to get them flushed out.
edit: I fixed it myself.
I deleted everything from the queue with 'MAILER DAEMON' in it, which were mostly bounces to out office messages.
Code: Select all
postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } /MAILER-DAEMON/ { print $1 }' | tr -d '*!' | sudo postsuper -d -
It was ClamAV all along. The good old yar/yara bug with a sprinkle of duplicate database on top.