How to remove email from a sendmail queue

EQ Admin

EQ Forum Admin
Staff member

A couple steps are needed to delete an email from a sendmail queue.

All of the following commands should be run as root

First, run the mailq command to find the message you want to delete.

> mailq

In this example the email I want to delete has this output:

[COLOR=Red]q7ICYnR3009369[/COLOR]  3801057 Sat Aug 18 08:34 <>
                 (reply: read error from
Note the identifier I marked in red above, there will be two files with that identifier in the name that need to be removed.

Next, cd /var/spool and then find the files with that name in them.

> cd /var/spool/
> find . -name "*7ICYnR30093*"

The output I got from the find commmand was:


To remove the email from the queue, delete the files:

> rm ./mqueue/dfq7ICYnR3009369 ./mqueue/qfq7ICYnR3009369

On some systems the folder might be named clientmqueue.

If you need to delete all email from the queue you can remove all files in the mqueue folder.