How to clean exim4 sending queue

Post Reply
User avatar
isscbta
Posts: 61
Joined: Mon Jul 19, 2021 1:41 am

To clean exim sending queue or in another words remove all mails that contains 'website.com' string - in your SSH, as root, run:

Code: Select all

grep -r '/var/spool/exim4/input' -e 'website.com' | cut -d: -f1 | cut -c 24-39 | xargs -n 1 exim -Mrm
Another (maybe better) solution is to delete all emails sent from SomeUsername account:

Code: Select all

grep -r '/var/spool/exim4/input' -e 'auth_id SomeUsername' | cut -d: -f1 | cut -c 24-39 | xargs -n 1 exim -Mrm

Tags:
Post Reply