Page 1 of 1

How to clean exim4 sending queue

Posted: Thu Nov 17, 2022 1:28 pm
by isscbta
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