Skip to content

Instantly share code, notes, and snippets.

@davidbehan
Created September 3, 2013 21:14
Show Gist options
  • Save davidbehan/6429701 to your computer and use it in GitHub Desktop.
Save davidbehan/6429701 to your computer and use it in GitHub Desktop.
Some atmail/exim commands for searching and managing the message queue
# start/stop/restart atmail
/etc/init.d/atmailserver start
/etc/init.d/atmailserver stop
/etc/init.d/atmailserver restart
# count of messages in queue
/usr/local/atmail/mailserver/bin/exim -bpc
# list of messages in queue
/usr/local/atmail/mailserver/bin/exim -bp
# Freeze message
/usr/local/atmail/mailserver/bin/exim -Mf 1UQh1e-00071v-Q5
# Remove messages older than 86400 (1 day)
/usr/local/atmail/mailserver/bin/exiqgrep -o 86400 -i | xargs /usr/local/atmail/mailserver/bin/exim -Mrm
# Delete message that contain 'a certain string'
grep -lr 'a certain string' /usr/local/atmail/mailserver/spool/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs /usr/local/atmail/mailserver/bin/exim -Mrm
# View body of message
/usr/local/atmail/mailserver/bin/exim -Mvb 1UQh1e-00071v-Q5
# View headers of message
/usr/local/atmail/mailserver/bin/exim -Mvh 1UQh1e-00071v-Q5
# List of message ids on the queue
/usr/local/atmail/mailserver/bin/exim -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment