exiqgrep allows you to search exim mail queue.

To search for a particular recipients, run

exiqgrep -r EMAIL_ADDR_HERE

To search for all emails from a particular email account, use

exiqgrep -f EMAIL_ADDR_HERE

You can use -i option to list only message id. This is useful when you need to delete mails from a particular account.

To delete all email sent from a particular email account, run

exiqgrep -f EMAIL_ADDR_HERE -i | xargs exim -Mrm

To delete all frozen emails from queue, run

exiqgrep -iz | xargs exim -Mrm

If you have too many emails, then use xargs -P option to specify how many mails to delete at a time

exiqgrep -iz | xargs -P20 exim -Mrm

This command will delete 20 mails at a time.

Delete all mails in queue

To delete all emails in queue run

exiqgrep -i | xargs -P20 exim -Mrm


Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *