How to purge your exim emails and handle a Line mismatch error
Just a quick post mainly for my reference on how to purge your exim mail queue and handle the "Line mismatch:" error you can get sometimes when things aren't working as they should.
You can list all of the messages backed up with the commands:
Show Plain Text- exim -bp
- // or
- mailq
To remove a particular message from the queue:
Show Plain Text- exim -Mrm {message-id}
To remove all of the messages in the queue:
Show Plain Text- exim -bp | exiqgrep -i | xargs exim -Mrm
- // or
- exiqgrep -i | xargs exim -Mrm
However sometimes the above doesn't work and you get "Line mismatch:
- exim -bpru | grep '<code>' | awk '{print $2}' | xargs -n 1 -P 20 exim -Mrm
You might need to run it a few times, just use the mailq command to get the to delete.