Skip to content

Instantly share code, notes, and snippets.

@iammart
Last active December 19, 2015 07:09
Show Gist options
  • Select an option

  • Save iammart/5916493 to your computer and use it in GitHub Desktop.

Select an option

Save iammart/5916493 to your computer and use it in GitHub Desktop.
Exim commands

Remove all emails from the queue

$ /usr/sbin/exim -bp | /usr/sbin/exiqgrep -i | xargs /usr/sbin/exim -Mrm

Remove emails from a particular user

$ /usr/sbin/exiqgrep -i -f address.tld | xargs /usr/sbin/exim -Mrm

Freeze all queued mail from a sender

$ /usr/sbin/exiqgrep -i -f address.tld | xargs exim -Mf

View simple Exim mail summary

$ /usr/sbin/exim -bp | /usr/sbin/exiqsumm

View current Exim mail queue summary

$ /usr/sbin/exim -bp | /usr/sbin/exiqsumm | egrep -v "\-\-|Volume|^$" | sort -bg | awk '{print "Volume: " $1 " \t Domain: " $5}'

Remove Exim mail queue

$ /usr/sbin/exim -bpru|awk {'print $3'}|xargs /usr/sbin/exim -Mrm

Stats

$ /usr/sbin/eximstats /var/log/exim_mainlog

Even better stats :)

$ /usr/sbin/eximstats -ne -nr -nt /var/log/exim_mainlog

Stop Exim

$ /etc/init.d/exim stop

// http://bradthemad.org/tech/notes/exim_cheatsheet.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment