Skip to content

Instantly share code, notes, and snippets.

@acdha
Created March 20, 2009 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acdha/82622 to your computer and use it in GitHub Desktop.
Save acdha/82622 to your computer and use it in GitHub Desktop.
Remove all mail from an exim server
#!/bin/sh
for msgid in `mailq | grep '<.*>' | cut -c10-27`; do
exim -Mrm $msgid
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment