How do I delete the pending mail in the exim queue?
You will first want to check the total count of email in the queue to get a better understanding of how many emails you will be cleaning out with the following command:
Once you've determined that is the number of emails you want to remove from the queue, you can delete the entire queue with the following command:
exim -bp | exiqgrep -i | xargs exim -Mrm
Note: This will remove ALL email from the mail queue, which may include legitimate emails. It is not possible to recover these emails once they have been deleted.
If the output returns that a message is locked it's because exim is currently processing the sending of that email. Example:
Message 1k0QaI-0007su-IM is locked