What is Exim?
Exim is an MTA. A Simple Message Transport Protocol (SMTP) mail server.
Exim is highly configurable and has many powerful and advanced configuration options including the abiliy to store lists of users, hosts, domains etc. in simple text files, databases, Lightweight Directory Access Protocol (LDAP) directories and “callouts” to other programs or scripts on the same computer. Exim is common in large scale Unix/Linux environments and ISPs (Internet Service Providers), moving millions of messages per day, but is equally suitable for small networks or individual workstations.
Following are few commands helpfull for troubleshoot exim issues.
This is a list of some of the commands I commonly use when troubleshooting exim:
Force delivery of one messageexim -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
Force another queue runexim -M email-id
Force another queue run and attempt to flush the frozen messageexim -qf
View the log for the messageexim -qff
View the body of the messageexim -Mvl messageID
View the header of the messageexim -Mvb messageID
Remove message without sending any error messageexim -Mvh messageID
Giveup and fail message to bounce the message to the Senderexim -Mrm messageID
How much mail in the queue?exim -Mg messageID
exim -bpr | grep "<" | wc -l
How many Frozen mails in the queue
exim -bpr | grep frozen | wc -l
Deleteing Frozen Messages
exim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm
To find out, how many messages are there in the mail queue:
To check the mails in the queue:exim -bpc
To force exim update:exim -bp
/scripts/eximup --force
Queues information
1) Print a count of the messages in the queue:
Quote:
root@localhost# exim -bpc
2) Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient):
Quote:
root@localhost# exim -bp
3) Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals):
Quote:
root@localhost# exim -bp | exiqsumm
4) Generate and display Exim stats from a logfile:
Quote:
root@localhost# eximstats /path/to/exim_mainlog
5) Generate and display Exim stats from a logfile, with less verbose output:
Quote:
root@localhost# eximstats -ne -nr -nt /path/to/exim_mainlog
6) Generate and display Exim stats from a logfile, for one particular day:
Quote:
root@localhost# fgrep 2007-02-16 /path/to/exim_mainlog | eximstats
7) Print what Exim is doing right now:
Quote:
root@localhost# exiwhat
8) To delete frozen emails
Quote:
exim -bp | awk '$6~"frozen" { print $3 }' | xargs exim -Mrm
9) To deliver emails forcefully
Quote:
exim -qff -v -C /etc/exim.conf &
Remove all messages older than five days (86400 * 5 = 432000 seconds):
root@localhost# exiqgrep -o 432000 -i | xargs exim -Mrm
exiqgrep -o 604800 -i | xargs exim -Mrm
3- days :- exiqgrep -o 259200 -i | xargs exim -Mrm
70 hours:- exiqgrep -o 4200 -i | xargs exim -Mrm






Reply With Quote
Bookmarks