Archive for the tag 'mail'

SBDavid

Flush mail queue in sendmail

Flush mail queue in sendmail

To flush the mail queue manually in sendmail servers, use

$ /usr/sbin/sendmail -q -v

Better way

Make a backup of the existing queue directory.

$ mv mqueue mqueue.bak

Create the ‘mqueue’ directory with the same permissions and ownership. Then, type in

$ /usr/sbin/sendmail -q -v -OQueueDirectory=/var/spool/mqueue.bak

You can use the same command to flush any sendmail queue as some servers have multiple queue setup like mqueue, mqueue.site, clientmqueue, q1, q2 etc.

« Prev