UnixServerAdmin

Server Administration & Management

Exim Commands

Exim Commands :-

1) To delete mails in the mail queue older than a day
# exiqgrep -o 86400 -i | xargs exim -Mrm

2) To delete mails in the mail queue older than 3 day
# exiqgrep -o 259200 -i | xargs exim -Mrm

3) exim -bp|grep $name Will show the mail in queue for $name
# exim -Mvh $MSGID View message header
# exim -Mvb $MSGID View message body
# exim -M $MSGID Force delivery of message
# exim -v -M $MSGID View the transact of message

4) Force delivery of one message
# exim -M email-id

5) Force another queue run
# exim -qf

6) Force another queue run and attempt to flush the frozen message
# exim -qff

7) View the log for the message
# exim -Mvl messageID

8) View the body/content of the message
# exim -Mvb messageID

9) View the header of the message
# exim -Mvh messageID

10) Remove message without sending any error message
# exim -Mrm messageID

11) Giveup and fail message to bounce the message to the Sender
# exim -Mg messageID

12) How much mail in the queue?
# exim -bpr | grep “<” | wc -l

13) How many Frozen mails in the queue
# exim -bpr | grep frozen | wc -l

14) Deleting Frozen Messages
# exim -bpr | grep frozen | awk {‘print $3’} | xargs exim -Mrm

15) Removing Bad/Nobody Mail
# exiqgrep -i -f nobody | xargs exim -Mrm

16) Removes Mail with weird Characters (Spam)
# exiqgrep -i -f “^<>$” | xargs exim -Mrm

17) Delete mails from a particular domain
# exiqgrep -i -f domain.com | xargs exim -Mrm

18) Flush the entire Mail queue
# exiqgrep -i -f | xargs exim -Mrm

19) To find out, how many messages are there in the mail queue
# exim -bpc

20) To check the mails in the queue
# exim -bp

21) Who is having large number of emails?
# exim -bp | exiqsumm

22) To force exim update:
# /scripts/eximup –force

August 10, 2011 Posted by | Exim | | 1 Comment