Child pages
  • exim one-liners
Skip to end of metadata
Go to start of metadata

There are things exim4's own options can do far better than any legacy cat/grep/cut/... construct, but who reads the whole man page every time?

Fortunately some nice people out there put together the most common exim4 one line hacks in overviews with examples:

10 queue operations listed at SWiK provided these:

exim -bpc : no of emails currently mail queue have
exim -M email-id => Force delivery of one message
exim -qf => Force another queue run
exim -qff => Force another queue run and attempt to flush the frozen message
exim -Mvl messageID => View the log for the message
exim -Mvb messageID => View the body of the message
exim -Mvh messageID => View the header of the message
exim -Mrm messageID => Remove message without sending any error message
exim -Mg messageID => Giveup and fail message to bounce the message to the Sender
How many mails on the Queue
exim -bpr | grep "

More extensive but still overviewable, the Exim Cheatsheet by brad the mad.

Testing who e-mails to a particular address would be delivered:

exim4 -bt foo@bar

Not exim specific, but worth mentioning any way, a one-line for having cron send exactly one test mail:

echo '* * * * * root /bin/echo "test from cron" && rm /etc/cron.d/mailtest' >/etc/cron.d/mailtest

 


Based on an article from: IBCL BLog, originally posted: 2009-07-03

  • No labels