{"id":60,"date":"2007-01-12T22:08:02","date_gmt":"2007-01-12T20:08:02","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/2007\/01\/12\/exim-faydali-komutlar-2\/"},"modified":"2007-01-13T00:55:50","modified_gmt":"2007-01-12T22:55:50","slug":"exim-faydali-komutlar-2","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2007\/01\/12\/exim-faydali-komutlar-2\/","title":{"rendered":"Exim Faydali Komutlar -2-&#8230;"},"content":{"rendered":"<p><img decoding=\"async\" alt=\"exim\" id=\"image61\" title=\"exim\" src=\"https:\/\/www.shukko.com\/x3\/wp-content\/uploads\/2007\/01\/exim-blue-ld.png\" \/><\/p>\n<p><strong>What are some tools that I can use to troubleshoot mail delivery issues with Exim on my linux \/ BSD \/ unix server?<\/strong><\/p>\n<p>This article will highlight some of the utilities included with the standard exim installation that assist in troubleshooting mail delivery issues.<\/p>\n<p><strong><u>Exigrep<\/u><\/strong><\/p>\n<p>Exigrep is very useful when you need to search for specific strings in the exim logfile.  The reason for this is that it will look for the search string you specify, match that to a message-ID, and then display all the lines pertaining to that message.<\/p>\n<p>Usage: <strong>exigrep<\/strong> <em> \/path\/to\/exim\/logfile<\/em><\/p>\n<p>Examples:<br \/>\n<a href=\"mailto:root@cpdemo\">root@cpdemo<\/a> [~]# <strong>exigrep 1BbLM3-0007fA-0v \/var\/log\/exim_mainlog<\/strong><br \/>\n<strong><em>2004-06-18 10:32:35 1BbLM3-0007fA-0v <= <\/em><\/strong><a href=\"mailto:root@cpdemo.example.com\"><strong><em>root@cpdemo.example.com<\/em><\/strong><\/a><strong><em> U=root P=local S=1037<br \/>\n2004-06-18 10:32:37 1BbLM3-0007fA-0v => \/dev\/null <<\/em><\/strong><a href=\"mailto:devnull@cpdemo.example.com\"><strong><em>devnull@cpdemo.example.com<\/em><\/strong><\/a><strong><em>> R=system_aliases T=**bypassed**<br \/>\n2004-06-18 10:32:37 1BbLM3-0007fA-0v Completed<\/em><\/strong><br \/>\n-OR-<\/p>\n<p><a href=\"mailto:root@cpdemo\">root@cpdemo<\/a> [~]# <strong>exigrep <\/strong><a href=\"mailto:inspirem@cpdemo.example.com\"><strong>inspirem@cpdemo.example.com<\/strong><\/a><strong> \/var\/log\/exim_mainlog<\/strong><br \/>\n<strong><em>2004-06-14 00:00:00 1BZjZg-000750-Ch <= <\/em><\/strong><a href=\"mailto:inspirem@cpdemo.example.com\"><strong><em>inspirem@cpdemo.example.com<\/em><\/strong><\/a><strong><em> U=inspirem P=local S=597<br \/>\n2004-06-14 00:00:00 1BZjZg-000750-Ch == example<\/em><\/strong><a href=\"mailto:t@yahoo.com\"><strong><em>@yahoo.com<\/em><\/strong><\/a><strong><em> R=defer_router defer (-1): All deliveries are handled by MailScanner<br \/>\n2004-06-14 00:00:03 1BZjZg-000750-Ch => example<\/em><\/strong><a href=\"mailto:t@yahoo.com\"><strong><em>@yahoo.com<\/em><\/strong><\/a><strong><em> R=lookuphost T=remote_smtp H=mx1.mail.yahoo.com [64.157.4.78]<br \/>\n2004-06-14 00:00:03 1BZjZg-000750-Ch Completed <\/em><\/strong><\/p>\n<p><strong><em>2004-06-15 00:00:01 1Ba63E-0004gD-US <= <\/em><\/strong><a href=\"mailto:inspirem@cpdemo.example.com\"><strong><em>inspirem@cpdemo.example.com<\/em><\/strong><\/a><strong><em> U=inspirem P=local S=597<br \/>\n2004-06-15 00:00:01 1Ba63E-0004gD-US == example<\/em><\/strong><a href=\"mailto:t@yahoo.com\"><strong><em>@yahoo.com<\/em><\/strong><\/a><strong><em> R=defer_router defer (-1): All deliveries are handled by MailScanner<br \/>\n2004-06-15 00:00:04 1Ba63E-0004gD-US => example<\/em><\/strong><a href=\"mailto:t@yahoo.com\"><strong><em>@yahoo.com<\/em><\/strong><\/a><strong><em> R=lookuphost T=remote_smtp H=mx1.mail.yahoo.com [64.156.215.19]<br \/>\n2004-06-15 00:00:04 1Ba63E-0004gD-US Completed<\/em><\/strong><\/p>\n<p>Also notice that if you are looking for information that is listed in multple email transactions(ie. email addresses, sending hosts, etc &#8230;), exigrep will provide a space in between each email transaction.<\/p>\n<p><strong \/><\/p>\n<p><strong><u>Exiwhat<\/u><\/strong><\/p>\n<p>The &#8216;exiwhat&#8217; command displays what each running exim process is doing at that given moment.  This can be helpful in tracking down the cause for hanging exim processes or monitoring exim processes while they perform certain functions during testing.<\/p>\n<p>Example:<\/p>\n<p><a href=\"mailto:root@cpdemo\">root@cpdemo<\/a> [~]# <strong>exiwhat<br \/>\n<em>2118 daemon: -q1h, listening for SMTP on port 25 (IPv4)<br \/>\n2130 daemon: no queue runs, listening for SMTPS on port 465 (IPv4)<br \/>\n31640 handling incoming connection from [67.19.0.37]<\/em> <\/strong><\/p>\n<p><strong><u>Exim -bh<\/u><\/strong><\/p>\n<p>This section describes another usage of the exim mail server binary with special arguments that allow you to simulate a mail delivery from an external IP as the sender from the local server with the exim installation.  This can be very useful when you need to recreate the mail delivery issue and you don&#8217;t have access to the sender&#8217;s machine to do so(ex. mail relaying, blacklists, etc.).<\/p>\n<p>Usage:  <strong>exim -bh<\/strong> <em \/><\/p>\n<p>This will create a fake SMTP session which appears to be from <em>. <\/em>Not only that, but it also displays what exim is doing behind the scenes, and also what it would normally log. Now, bear in mind that this will not actually inject a message into the queue, nor will it actually log anything. This does however require knowledge of SMTP commands, but they are fairly easy. I have highlighted them in bold below for easier reading.  Example:<\/p>\n<p><a href=\"mailto:root@cpdemo\">root@cpdemo<\/a> [\/var\/spool\/exim\/input]# <strong>exim -bh 216.87.129.155 <\/strong><\/p>\n<p>**** SMTP testing session as if from host 216.87.129.155<br \/>\n**** but without any ident (RFC 1413) callback.<br \/>\n**** This is not for real!<\/p>\n<p>>>> host in host_lookup? no (option unset)<br \/>\n>>> host in host_reject_connection? no (option unset)<br \/>\n>>> host in sender_unqualified_hosts? no (option unset)<br \/>\n>>> host in recipient_unqualified_hosts? no (option unset)<br \/>\n>>> host in helo_verify_hosts? no (option unset)<br \/>\n>>> host in helo_try_verify_hosts? no (option unset)<br \/>\n>>> host in helo_accept_junk_hosts? yes (matched &#8220;*&#8221;)<br \/>\n220-cpdemo.domain.com ESMTP Exim 4.34 #1 Fri, 18 Jun 2004 16:05:31 -0500<br \/>\n220-We do not authorize the use of this system to transport unsolicited,<br \/>\n220 and\/or bulk e-mail.<br \/>\n<strong>helo bbozo-2.example.com<\/strong><br \/>\n>>> bbozo-2.example.com in helo_lookup_domains? no (end of list)<br \/>\n250 cpdemo.domain.com Hello bbozo-2.example.com [216.87.129.155]<br \/>\n<strong>mail from: <\/strong><a href=\"mailto:ken@bbozo-2.example.com\"><strong>ken@bbozo-2.example.com<\/strong><\/a><br \/>\n250 OK<br \/>\n<strong>rcpt to: <\/strong><a href=\"mailto:inspirem@cpdemo.domain.com\"><strong>inspirem@cpdemo.domain.com<\/strong><\/a><br \/>\n>>> using ACL &#8220;check_recipient&#8221;<br \/>\n>>> processing &#8220;accept&#8221;<br \/>\n>>> check hosts = :<br \/>\n>>> host in &#8220;:&#8221;? no (end of list)<br \/>\n>>> accept: condition test failed<br \/>\n>>> processing &#8220;warn&#8221;<br \/>\n>>> check condition = ${if and {{match{$local_part}{(.*)-bounces+.*}} {exists {\/usr\/local\/cpanel\/3rdparty\/mailman\/lists\/${lc:$1}\/config.pck}}} {yes}{no}}<br \/>\n>>> = no<br \/>\n>>> warn: condition test failed<br \/>\n>>> processing &#8220;accept&#8221;<br \/>\n>>> check condition = ${if and {{match{$local_part}{(.*)-bounces+.*}} {exists {\/usr\/local\/cpanel\/3rdparty\/mailman\/lists\/${lc:$1}\/config.pck}}} {yes}{no}}<br \/>\n>>> = no<br \/>\n>>> accept: condition test failed<br \/>\n>>> processing &#8220;warn&#8221;<br \/>\n>>> check condition = ${if and {{match{$local_part}{(.*)-bounces+.*}} {exists {\/usr\/local\/cpanel\/3rdparty\/mailman\/lists\/${lc:$1}_${lc:$domain}\/config.pck}}} {yes}{no}}<br \/>\n>>> = no<br \/>\n>>> warn: condition test failed<br \/>\n>>> processing &#8220;accept&#8221;<br \/>\n>>> check condition = ${if and {{match{$local_part}{(.*)-bounces+.*}} {exists {\/usr\/local\/cpanel\/3rdparty\/mailman\/lists\/${lc:$1}_${lc:$domain}\/config.pck}}} {yes}{no}}<br \/>\n>>> = no<br \/>\n>>> accept: condition test failed<br \/>\n>>> processing &#8220;require&#8221;<br \/>\n>>> check verify = sender<br \/>\n>>> <a href=\"mailto:ken@bbozo-2.example.com\">ken@bbozo-2.example.com<\/a> in &#8220;<a href=\"mailto:nobody@lsearch;\/etc\/localdomains\">nobody@lsearch;\/etc\/localdomains<\/a>&#8220;? no (end of list)<br \/>\n>>> <a href=\"mailto:ken@bbozo-2.example.com\">ken@bbozo-2.example.com<\/a> in &#8220;<a href=\"mailto:cpanel@lsearch;\/etc\/localdomains\">cpanel@lsearch;\/etc\/localdomains<\/a>&#8220;? no (end of list)<br \/>\n>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><br \/>\n>>> routing <a href=\"mailto:ken@bbozo-2.example.com\">ken@bbozo-2.example.com<\/a><br \/>\n>>> bbozo-2.example.com in &#8220;lsearch;\/etc\/localdomains&#8221;? no (end of list)<br \/>\n>>> bbozo-2.example.com in &#8220;! +local_domains&#8221;? yes (end of list)<br \/>\n>>> calling lookuphost router<br \/>\n>>> 216.87.129.155 in &#8220;0.0.0.0 : 127.0.0.0\/8 : 64.94.110.0\/24&#8221;? no (end of list)<br \/>\n>>> routed by lookuphost router<br \/>\n>>> &#8212;&#8212;&#8212;&#8211; end verify &#8212;&#8212;&#8212;&#8212;<br \/>\n>>> require: condition test succeeded<br \/>\n>>> processing &#8220;accept&#8221;<br \/>\n>>> check domains = +local_domains<br \/>\n>>> cpdemo.domain.com in &#8220;lsearch;\/etc\/localdomains&#8221;? yes (matched &#8220;lsearch;\/etc\/localdomains&#8221;)<br \/>\n>>> cpdemo.domain.com in &#8220;+local_domains&#8221;? yes (matched &#8220;+local_domains&#8221;)<br \/>\n>>> check verify = recipient<br \/>\n>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><br \/>\n>>> routing <a href=\"mailto:inspirem@cpdemo.domain.com\">inspirem@cpdemo.domain.com<\/a><br \/>\n>>> cpdemo.domain.com in &#8220;! +local_domains&#8221;? no (matched &#8220;! +local_domains&#8221; &#8211; cached)<br \/>\n>>> cpdemo.domain.com in &#8220;! +local_domains&#8221;? no (matched &#8220;! +local_domains&#8221; &#8211; cached)<br \/>\n>>> cpdemo.domain.com in &#8220;! +local_domains&#8221;? no (matched &#8220;! +local_domains&#8221; &#8211; cached)<br \/>\n>>> cpdemo.domain.com in &#8220;lsearch;\/etc\/userdomains&#8221;? no (end of list)<br \/>\n>>> cpdemo.domain.com in &#8220;! lsearch;\/etc\/userdomains&#8221;? yes (end of list)<br \/>\n>>> cpdemo.domain.com in &#8220;lsearch;\/etc\/localdomains&#8221;? yes (matched &#8220;lsearch;\/etc\/localdomains&#8221;)<br \/>\n>>> calling virtual_aliases_nostar router<br \/>\n>>> virtual_aliases_nostar router declined for <a href=\"mailto:inspirem@cpdemo.domain.com\">inspirem@cpdemo.domain.com<\/a><br \/>\n>>> cpdemo.domain.com in &#8220;lsearch;\/etc\/userdomains&#8221;? no (end of list)<br \/>\n>>> cpdemo.domain.com in &#8220;lsearch;\/etc\/userdomains&#8221;? no (end of list)<br \/>\n>>> cpdemo.domain.com in &#8220;lsearch;\/etc\/localdomains&#8221;? yes (matched &#8220;lsearch;\/etc\/localdomains&#8221;)<br \/>\n>>> cpdemo.domain.com in &#8220;lsearch;\/etc\/localdomains&#8221;? yes (matched &#8220;lsearch;\/etc\/localdomains&#8221;)<br \/>\n>>> calling virtual_aliases router<br \/>\n>>> virtual_aliases router declined for <a href=\"mailto:inspirem@cpdemo.domain.com\">inspirem@cpdemo.domain.com<\/a><br \/>\n>>> calling system_aliases router<br \/>\n>>> system_aliases router declined for <a href=\"mailto:inspirem@cpdemo.domain.com\">inspirem@cpdemo.domain.com<\/a><br \/>\n>>> calling local_aliases router<br \/>\n>>> local_aliases router declined for <a href=\"mailto:inspirem@cpdemo.domain.com\">inspirem@cpdemo.domain.com<\/a><br \/>\n>>> cpdemo.domain.com in &#8220;! lsearch;\/etc\/userdomains&#8221;? yes (end of list)<br \/>\n>>> cpdemo.domain.com in &#8220;! lsearch;\/etc\/userdomains&#8221;? yes (end of list)<br \/>\n>>> calling localuser router<br \/>\n>>> routed by localuser router<br \/>\n>>> &#8212;&#8212;&#8212;&#8211; end verify &#8212;&#8212;&#8212;&#8212;<br \/>\n>>> accept: condition test succeeded<br \/>\n250 Accepted<br \/>\n<strong>Data<br \/>\n<\/strong>354 Enter message, ending with &#8220;.&#8221; on a line by itself<br \/>\n<strong>From: Ben bozo <<\/strong><a href=\"mailto:ken@bbozo-2.example.com\"><strong>ken@bbozo-2.example.com<\/strong><\/a><strong>><\/strong><br \/>\n<strong>Subject: Test<br \/>\n<\/strong>>>> host in ignore_fromline_hosts? no (option unset)<\/p>\n<p><strong>Test.<br \/>\n.<br \/>\n<\/strong>>>> using ACL &#8220;check_message&#8221;<br \/>\n>>> processing &#8220;require&#8221;<br \/>\n>>> check verify = header_sender<br \/>\n>>> verifying From: header address Ben bozo <<a href=\"mailto:ken@bbozo-2.example.com\">ken@bbozo-2.example.com<\/a>><br \/>\n>>> <a href=\"mailto:ken@bbozo-2.example.com\">ken@bbozo-2.example.com<\/a> in &#8220;<a href=\"mailto:nobody@lsearch;\/etc\/localdomains\">nobody@lsearch;\/etc\/localdomains<\/a>&#8220;? no (end of list)<br \/>\n>>> <a href=\"mailto:ken@bbozo-2.example.com\">ken@bbozo-2.example.com<\/a> in &#8220;<a href=\"mailto:cpanel@lsearch;\/etc\/localdomains\">cpanel@lsearch;\/etc\/localdomains<\/a>&#8220;? no (end of list)<br \/>\n>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><br \/>\n>>> routing <a href=\"mailto:ken@bbozo-2.example.com\">ken@bbozo-2.example.com<\/a><br \/>\n>>> bbozo-2.example.com in &#8220;lsearch;\/etc\/localdomains&#8221;? no (end of list)<br \/>\n>>> bbozo-2.example.com in &#8220;! +local_domains&#8221;? yes (end of list)<br \/>\n>>> calling lookuphost router<br \/>\n>>> 216.87.129.155 in &#8220;0.0.0.0 : 127.0.0.0\/8 : 64.94.110.0\/24&#8221;? no (end of list)<br \/>\n>>> routed by lookuphost router<br \/>\n>>> require: condition test succeeded<br \/>\n>>> processing &#8220;accept&#8221;<br \/>\n>>> accept: condition test succeeded<br \/>\nLOG: 1BbQZP-00005P-Gg <= <a href=\"mailto:ken@bbozo-2.example.com\">ken@bbozo-2.example.com<\/a> H=(bbozo-2.example.com) [216.87.129.155] P=smtp S=264<br \/>\n250 OK id=1BbQZP-00005P-Gg<\/p>\n<p>**** SMTP testing: that is not a real message id!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What are some tools that I can use to troubleshoot mail delivery issues with Exim on my linux \/ BSD \/ unix server? This article will highlight some of the utilities included with the standard exim installation that assist in troubleshooting mail delivery issues. Exigrep Exigrep is very useful when you need to search for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-60","post","type-post","status-publish","format-standard","hentry","category-exim"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/60","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=60"}],"version-history":[{"count":0,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/60\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}