We had a huge influx of spam that was stuck in the Exim mail queue, so I ran this command replacing 'X' with some of the offending spam addresses and terms to clean the queue while keeping good emails:
I've used that line before with good results, and it worked fine, though I'm not sure what's going on now as most of the remaining 200 or so good emails left in the queue are now malformed.
For example (looking in the Mail Queue Manager in WHM), on each line the area is blank where there should be the Message ID linking to the message. The message ID now appears where the file size should be displayed.
How can I repair these files? I've checked them manually on the server and they appear to be valid, but I'm no Exim expert.
Code:
grep -lir "X" /var/spool/exim/input/* | xargs rm -fv
For example (looking in the Mail Queue Manager in WHM), on each line the area is blank where there should be the Message ID linking to the message. The message ID now appears where the file size should be displayed.
How can I repair these files? I've checked them manually on the server and they appear to be valid, but I'm no Exim expert.