Jump to content

Support Our Free and Open Source Software

Please support us financially so we may continue to keep our software free and best in class


Exim :- Useful administrative commands

Recommended Posts

Exim is a message transfer agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the Internet. It is freely available under the terms of the GNU General Public Licence. In style it is similar to Smail 3, but its facilities are more general. There is a great deal of flexibility in the way mail can be routed, and there are extensive facilities for checking incoming mail. Exim can be installed in place of Sendmail, although the configuration of Exim is quite different.Here are some useful commands to run checks on mail on the server.1. Print a count of the messages in the queue:#exim -bpc

root@web-012 [~]# exim -bpc1

2. Print a listing of the messages in the queue#exim -bp

root@web-012 [~]# exim -bpcarlineshirly@power.alstom.com9h 2.0K 1RSHdk-0003zj-07 <> *** frozen ***alyssa.campbell@lightwave.com

3. Print a summary of messages in the queue#exim -bp | exiqsumm

root@web-012 [~]# exim -bp | exiqsummCount Volume Oldest Newest Domain----- ------ ------ ------ ------1 2048 29h 29h interstaterelocation.net1 2048 9h 9h lightwave.com1 2457 42h 42h news.cqi.com1 1945 22h 22h power.alstom.com---------------------------------------------------------------4 8499 42h 9h TOTAL

4. Print what Exim is doing right now:#exiwhat

root@web-012 [~]# exiwhat4123 daemon: -q1h, listening for SMTP on port 25 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

5. Display all of Exim’s configuration settings:# exim -bP6. Use -f to search the queue for messages from a specific sender:#exiqgrep -f user@domain.com7. Use -r to search the queue for messages for a specific recipient/domain:#exiqgrep -r user@domain.com8. Start a queue run:#exim -q -v9. Start a queue run for just local deliveries:exim -ql -v10. Remove a message from the queue:#exim -Mrm

root@web-012 [~]# exim -Mrm 1RSHdk-0003zj-07Message 1RSHdk-0003zj-07 has been removed

11. Deliver a message, whether it’s frozen or not, whether the retry time has been reached or not#exim -M 12. Remove all frozen messages:#exiqgrep -z -i | xargs exim -Mrm

root@web-012 [~]# exiqgrep -z -i | xargs exim -MrmMessage 1RRyxQ-0003FJ-Aq has been removedMessage 1RS60i-00079d-NF has been removed

13. Remove all messages older than 1 days (86400 * 1 = 86400 seconds):#exiqgrep -o 432000 -i | xargs exim -Mrm14. Freeze all queued mail from a given sender:#exiqgrep -i -f luser@example.tld | xargs exim -Mf15. View a message’s headers#exim -Mvh 16. View a message’s body:#exim -Mvb 17. View a message’s logs:#exim -Mvl

root@server-012[~]# exim -Mvl 1RRn0a-0006pW-LV2011-11-19 15:39:12 Received from <> R=1RRn0V-0006pI-Vl U=mailnull P=local S=24472011-11-19 15:42:21 wdncom.uslec.read.readnews.com [] Connection timed out2011-11-19 15:42:21 elian.dancey@wdn.com.client.newsread.com <elian.dancey@news.cqi.com> R=dk_lookuphost T=dk_remote_smtp defer (110): Connection timed out2011-11-19 16:05:26 wdncom.uslec.read.readnews.com [] Connection timed out

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...