Linux: Sendmail: Check/ Clear / Delete / Flush Mail Queue

To display a summary of the mail messages queued for future delivery. Type the following command:

# mailq

/var/spool/mqueue (1 request) —–Q-ID—– –Size– —–Q-Time—– ————Sender/Recipient———–
p41J74u5032681 893 Fri Apr 1 14:07 8DITNIME (Deferred: Connection timed out with
Total requests: 1

All the mail queue store at /var/spool/mqueue. To remove all the mail queue, just delete all files in /var/spool/mqueue

# cd /var/spool/mqueue/
# ls
# rm *

To force mail queue to be sent.
Type the following command:

# sendmail -v -q