{"id":38,"date":"2009-09-07T23:44:12","date_gmt":"2009-09-08T05:44:12","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=38"},"modified":"2026-03-09T00:26:25","modified_gmt":"2026-03-09T06:26:25","slug":"exim-utilities","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/exim-utilities\/","title":{"rendered":"Exim Utilities: Essential Tools for Mail Server Administration"},"content":{"rendered":"\n<p>Exim is a widely used <strong>Mail Transfer Agent (MTA)<\/strong> that comes pre-installed on many Linux and Unix-based systems. It is responsible for routing and delivering email messages across networks. Because of its flexibility, scalability, and powerful configuration options, Exim is commonly used on servers that manage large volumes of email traffic.<\/p>\n\n\n\n<p>To simplify administration and troubleshooting, Exim provides a variety of <strong>built-in utilities<\/strong>. These tools help system administrators monitor mail queues, analyze logs, manage databases, and maintain server performance. Understanding these utilities can make it easier to diagnose issues and keep your mail server running efficiently.<\/p>\n\n\n\n<p>Below are some of the most commonly used <strong>Exim utilities and their functions<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common Exim Utilities<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">exiwhat \u2013 Check Running Exim Processes<\/h3>\n\n\n\n<p>The <strong>exiwhat<\/strong> command displays information about what current Exim processes are doing.<\/p>\n\n\n\n<p>The script sends a signal to running Exim processes and then collects their responses. It waits briefly before displaying the results. Because it needs permission to signal the processes, it is usually executed with <strong>root privileges<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exiqgrep \u2013 Search the Mail Queue<\/h3>\n\n\n\n<p>The <strong>exiqgrep<\/strong> utility helps administrators search the Exim mail queue using specific criteria.<\/p>\n\n\n\n<p>It works with the <code>exim -bpu<\/code> command to filter messages based on conditions such as sender, recipient, size, or age.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Common Options<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><div class=\"pcrstb-wrap\"><table class=\"has-fixed-layout\"><thead><tr><th>Option<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>-f &lt;regex&gt;<\/code><\/td><td>Match sender address<\/td><\/tr><tr><td><code>-r &lt;regex&gt;<\/code><\/td><td>Match recipient address<\/td><\/tr><tr><td><code>-s &lt;regex&gt;<\/code><\/td><td>Match message size<\/td><\/tr><tr><td><code>-y &lt;seconds&gt;<\/code><\/td><td>Match messages younger than given time<\/td><\/tr><tr><td><code>-o &lt;seconds&gt;<\/code><\/td><td>Match messages older than given time<\/td><\/tr><tr><td><code>-z<\/code><\/td><td>Show frozen messages only<\/td><\/tr><tr><td><code>-x<\/code><\/td><td>Show non-frozen messages<\/td><\/tr><\/tbody><\/table><\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Output Options<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-c<\/code> \u2013 Display count of messages<\/li>\n\n\n\n<li><code>-l<\/code> \u2013 Show full message details (default)<\/li>\n\n\n\n<li><code>-i<\/code> \u2013 Display message IDs only<\/li>\n\n\n\n<li><code>-b<\/code> \u2013 Brief output (one line per message)<\/li>\n\n\n\n<li><code>-R<\/code> \u2013 Reverse order display<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">exiqsumm \u2013 Queue Summary Tool<\/h3>\n\n\n\n<p>The <strong>exiqsumm<\/strong> utility summarizes messages currently waiting in the mail queue.<\/p>\n\n\n\n<p>It reads the output from the <code>exim -bp<\/code> command and generates a summary showing how many messages are queued for each domain.<\/p>\n\n\n\n<p>Example usage:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exim -bp | exiqsumm<\/code><\/pre>\n\n\n\n<p>Example output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>3 2322 74m 66m example.com<\/code><\/pre>\n\n\n\n<p>This shows the number of queued messages and the time they have been waiting.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exigrep \u2013 Search Exim Logs<\/h3>\n\n\n\n<p>The <strong>exigrep<\/strong> tool is used to search Exim log files for specific patterns.<\/p>\n\n\n\n<p>When a match is found, the tool extracts <strong>all related log entries for that message<\/strong>, making it easier to troubleshoot mail delivery issues.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Usage<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>exigrep &#91;-l] &#91;-t&lt;n&gt;] &lt;pattern&gt; &#91;logfile]<\/code><\/pre>\n\n\n\n<p>It works with both <strong>Exim log format and syslog format<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exipick \u2013 Select Messages by Criteria<\/h3>\n\n\n\n<p>The <strong>exipick<\/strong> command lists messages from the mail queue based on specific conditions.<\/p>\n\n\n\n<p>It provides flexible filtering options for administrators who need to locate messages quickly.<\/p>\n\n\n\n<p>To view available options, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exipick --help<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">exicyclog \u2013 Rotate Log Files<\/h3>\n\n\n\n<p>The <strong>exicyclog<\/strong> script is used to rotate Exim log files such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>mainlog<\/li>\n\n\n\n<li>rejectlog<\/li>\n<\/ul>\n\n\n\n<p>This helps prevent log files from growing too large.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Options<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><div class=\"pcrstb-wrap\"><table class=\"has-fixed-layout\"><thead><tr><th>Option<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>-k &lt;count&gt;<\/code><\/td><td>Number of log files to retain<\/td><\/tr><tr><td><code>-l &lt;path&gt;<\/code><\/td><td>Specify log file location<\/td><\/tr><\/tbody><\/table><\/div><\/figure>\n\n\n\n<p>Some systems may use their own <strong>log rotation mechanisms<\/strong>, but exicyclog is useful when those are not configured.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">eximstats \u2013 Mail Statistics Tool<\/h3>\n\n\n\n<p>The <strong>eximstats<\/strong> utility analyzes Exim log files and generates statistics about email activity.<\/p>\n\n\n\n<p>It can output results in:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Plain text<\/li>\n\n\n\n<li>HTML reports<\/li>\n<\/ul>\n\n\n\n<p>By default, it shows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Number of emails sent and received<\/li>\n\n\n\n<li>Message volume by host<\/li>\n\n\n\n<li>Top hosts sending or receiving mail<\/li>\n<\/ul>\n\n\n\n<p>Statistics can also be generated for <strong>domains, email addresses, or individual users<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exim_checkaccess \u2013 Test Mail Access Policies<\/h3>\n\n\n\n<p>The <strong>exim_checkaccess<\/strong> utility tests whether a specific IP address or email address is allowed to send mail.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exim_checkaccess 10.9.8.7 user@example.com<\/code><\/pre>\n\n\n\n<p>It is a simplified version of the <strong>-bh SMTP debugging command<\/strong>, making policy testing easier.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exim_dbmbuild \u2013 Create DBM Database Files<\/h3>\n\n\n\n<p>The <strong>exim_dbmbuild<\/strong> command creates DBM files from input files used in alias or lookup configurations.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exim_dbmbuild \/etc\/aliases \/etc\/aliases.db<\/code><\/pre>\n\n\n\n<p>These files improve lookup performance for Exim configurations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exinext \u2013 Check Retry Information<\/h3>\n\n\n\n<p>The <strong>exinext<\/strong> utility retrieves retry information for mail delivery attempts.<\/p>\n\n\n\n<p>It looks up domain hosts and displays:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First failed delivery time<\/li>\n\n\n\n<li>Last retry attempt<\/li>\n\n\n\n<li>Next scheduled retry<\/li>\n<\/ul>\n\n\n\n<p>This helps administrators diagnose <strong>mail delivery failures<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exim_dumpdb \u2013 Dump Database Contents<\/h3>\n\n\n\n<p>The <strong>exim_dumpdb<\/strong> tool displays the contents of Exim&#8217;s internal databases.<\/p>\n\n\n\n<p>These databases include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>retry database<\/li>\n\n\n\n<li>wait-transport database<\/li>\n\n\n\n<li>callout cache<\/li>\n\n\n\n<li>ratelimit data<\/li>\n<\/ul>\n\n\n\n<p>It is useful for examining internal mail server data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exim_tidydb \u2013 Clean Up Databases<\/h3>\n\n\n\n<p>The <strong>exim_tidydb<\/strong> utility removes outdated records from Exim databases.<\/p>\n\n\n\n<p>By default, it deletes records older than <strong>30 days<\/strong>, but administrators can change the threshold.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exim_tidydb -t 7d \/var\/spool\/exim retry<\/code><\/pre>\n\n\n\n<p>This removes retry records older than seven days.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exim_fixdb \u2013 Modify Database Records<\/h3>\n\n\n\n<p>The <strong>exim_fixdb<\/strong> tool allows administrators to <strong>interactively modify database records<\/strong>.<\/p>\n\n\n\n<p>It is mainly used for testing but can also help resolve certain database issues on live systems.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">exim_lock \u2013 Mailbox Locking Utility<\/h3>\n\n\n\n<p>The <strong>exim_lock<\/strong> command locks a mailbox file using the same method as Exim.<\/p>\n\n\n\n<p>This prevents mail agents from modifying the mailbox during maintenance or troubleshooting.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exim_lock \/var\/spool\/mail\/user<\/code><\/pre>\n\n\n\n<p>Once the mailbox is locked, administrators can safely inspect or back up the file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Exim utilities provide powerful tools for <strong>mail server management, troubleshooting, and maintenance<\/strong>. From monitoring active processes and analyzing logs to managing mail queues and databases, these utilities help administrators maintain a reliable email system.<\/p>\n\n\n\n<p>Understanding how to use these commands effectively can significantly improve <strong>mail server performance, security, and troubleshooting efficiency<\/strong>.<\/p>\n\n\n\n<p>If you need assistance managing your mail server or troubleshooting Exim issues, professional server administrators can help ensure your system runs smoothly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.supportpro.com\/requestquote.php\" title=\"\">Need Help Managing Your Mail Server?<\/a><\/h3>\n\n\n\n<p>If you require expert assistance with <strong>Exim configuration, troubleshooting, or server maintenance<\/strong>, contact <strong><a href=\"https:\/\/www.supportpro.com\/requestquote.php\"> SupportPRO Server Admin<\/a><\/strong> for professional support services.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><img decoding=\"async\" id=\"hs-cta-img-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-img\" style=\"border-width: 0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b.png\" alt=\"Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value\"><\/a><\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exim is a widely used Mail Transfer Agent (MTA) that comes pre-installed on many Linux and Unix-based systems. It is responsible for routing and delivering email messages across networks. Because&hellip;<\/p>\n","protected":false},"author":4,"featured_media":15967,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general-topics"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":6,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":15961,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/38\/revisions\/15961"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media\/15967"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}