{"id":51359,"date":"2021-01-09T03:01:59","date_gmt":"2021-01-08T17:01:59","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=51359"},"modified":"2021-01-09T12:56:16","modified_gmt":"2021-01-09T02:56:16","slug":"centos-exim-mail-server-sanity-check-testing-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/centos-exim-mail-server-sanity-check-testing-tutorial\/","title":{"rendered":"CentOS Exim Mail Server Sanity Check Testing Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Linux\/exim_sanity_check_test.gif\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CentOS Exim Mail Server Sanity Check Testing Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Linux\/exim_sanity_check_test.gif\" title=\"CentOS Exim Mail Server Sanity Check Testing Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">CentOS Exim Mail Server Sanity Check Testing Tutorial<\/p><\/div>\n<p>To send an email often relies on a Mail Server and accompanying software and hardware and networking to support just such a Mail Server.  Here at our Linux web server (CentOS) here at RJM Programming we oversee an Exim Mail Server we last talked about with <a title='CentOS Exim Advanced Configuration Primer Tutorial' href='#coseacpt'>CentOS Exim Advanced Configuration Primer Tutorial<\/a>.<\/p>\n<p>In the normal case of events <a target=_blank title='Exim Mail Server on CentOS information' href='https:\/\/www.google.com\/search?rlz=1C5CHFA_enAU832AU832&#038;sxsrf=ALeKk01Cl2r4LTazuOsCvYwYzIBM3fyVjQ%3A1610075290354&#038;ei=msz3X-ahFefez7sP1t2lgAg&#038;q=exim+mail+server+centos&#038;oq=exim+mail+server+centos&#038;gs_lcp=CgZwc3ktYWIQAzIJCAAQyQMQFhAeMgYIABAWEB46CAgAEMkDEJECOgIIADoHCAAQFBCHAjoFCAAQyQM6CggAEMkDEBQQhwJQj80LWM_wC2DB8gtoAHABeACAAfIEiAGoLZIBCjItMTAuNC4xLjKYAQCgAQGqAQdnd3Mtd2l6wAEB&#038;sclient=psy-ab&#038;ved=0ahUKEwjm1vjtrYvuAhVn73MBHdZuCYAQ4dUDCA0&#038;uact=5'>&#8220;exim&#8221;<\/a> does its job sending and receiving email related to email addresses ending in &#8220;@rjmprogramming.com.au&#8221; with little worry, and so we are usually not worried unduly concerning its running, but yesterday we had occasion to be curious, because to proceed with our coding we wanted to have an email &#8220;go through to the keeper&#8221; <font size=1>(so to speak)<\/font>.  But they weren&#8217;t, and the issue concerned an email sent via PHP mail using a sender whose email address ended in &#8220;@rjmprogramming.com.au&#8221; so the Exim Mail Server comes into play (unlike a client email application mailto: type of email).<\/p>\n<p>We were using <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a>\/<a target=_blank title='FormData object information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/FormData'>FormData<\/a> techniques to send the email and according to error checking at this client end of things, &#8220;no worries&#8221;.  PHP logs?  No apparent issues.  So what next?<\/p>\n<p>Thanks, <a target=_blank href='https:\/\/www.google.com\/search?q=text+exim+centos&#038;rlz=1C5CHFA_enAU832AU832&#038;oq=text+exim+centos&#038;aqs=chrome..69i57j33i160.7895j0j7&#038;sourceid=chrome&#038;ie=UTF-8' title='Useful search, thanks'>Gooooooooggggggllllllee<\/a> led us to the incredibly useful <a target=_blank title='Useful link, thanks' href='https:\/\/makandracards.com\/operations\/36349-send-a-testmail-via-exim'>send a testmail via exim &#8211; makandra Operations<\/a>, thanks, <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Linux\/exim_sanity_check_test.gif\" title=\"Click picture\">getting us to<\/a> &#8230;<\/p>\n<p><code><br \/>\n# exim -v rmetcalfe41@gmail.com<br \/>\nFrom: rmetcalfe@rjmprogramming.com.au<br \/>\nSubject: Foobar<br \/>\nText Text Text<br \/>\n<br \/>\nI like Pie!<br \/>\n&lt;Command(Mac)\/Ctrl(Windows)+D&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; the results of actions above helping us see what the issues were, holding up the email.  Much later it <font size=1>(ie. the original email)<\/font> arrived, as well as &#8230;<\/p>\n<p><img src='http:\/\/www.rjmprogramming.com.au\/Linux\/exim_result.jpg' title='Exim Sanity Check Test email arrives'><\/img><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/centos-exim-mail-server-sanity-check-testing-tutorial\/'>CentOS Exim Mail Server Sanity Check Testing Tutorial<\/a>.<\/p-->\n<hr>\n<p id='coseacpt'>Previous relevant <a target=_blank title='CentOS Exim Advanced Configuration Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/centos-exim-advanced-configuration-primer-tutorial\/'>CentOS Exim Advanced Configuration Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/exim_bit.gif\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CentOS Exim Advanced Configuration Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/exim_bit.gif\" title=\"CentOS Exim Advanced Configuration Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">CentOS Exim Advanced Configuration Primer Tutorial<\/p><\/div>\n<p>There are two file resource aspects to watch out for regarding a web server hard disk storage &#8230;<\/p>\n<ul>\n<li>hard disk space<\/li>\n<li>hard disk inode count (for Linux and unix web servers)<\/li>\n<\/ul>\n<p> &#8230; which can, respectively, be monitored by Linux commands &#8230;<\/p>\n<ul>\n<li>df -k \/<\/li>\n<li>df -i \/<\/li>\n<\/ul>\n<p>On our CentOS rjmprogramming.com.au web server recently we had occasion to do a check of this, and wanted to improve the web server hard disk situation for both measures, picking the \/var folder of our web server.  So we executed, respectively &#8230;<\/p>\n<ul>\n<li>find \/var -xdev -type f -size +100M<\/li>\n<li>find \/var -mtime -1 -ls<\/li>\n<\/ul>\n<p> &#8230; the latter one being a list of files on \/var modified in the last day being our idea to try to see what daily log filing might be contributing big time to hard disk inode usage.  And that&#8217;s where we found out this way that our Exim Mail Server logs extensively, and that we could do without those in folders off &#8230;<\/p>\n<p><code><br \/>\n\/var\/spool\/exim\/msglog\/<br \/>\n<\/code><\/p>\n<p>We tried the latter of two deletion ideas we show below &#8230;<\/p>\n<ul>\n<li>all at once via &#8230;<br \/>\n<code><br \/>\ncd \/var\/spool\/exim<br \/>\nfind msglog -type f -exec rm -rf {} \\;<br \/>\n<\/code>\n<\/li>\n<li>broken up &#8230; via a series of deletions of the ilk &#8230;<br \/>\n<code><br \/>\ncd \/var\/spool\/exim\/msglog<br \/>\nrm -f A\/*<br \/>\nrm -f a\/*<br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p>Then the next job was to stop Exim remaking these logs and wish to thank <a target=_blank title='Useful link, thanks' href='https:\/\/forums.cpanel.net\/threads\/how-to-add-no_message_logs-to-the-exim-configuration-editor.415601\/'>this useful link<\/a> for great advice here, that led to this advice we give &#8230;<\/p>\n<ol>\n<li>log in to WHM cPanel<\/li>\n<li>in search bar type &#8220;Exim&#8221;<\/li>\n<li>click the &#8220;Exim Configuration Manager&#8221;<\/li>\n<li>click &#8220;Advanced Editor&#8221; tab (up the top)<\/li>\n<li>click the blue &#8220;Add additional configuration setting&#8221; button well down the webpage<\/li>\n<li>click &#8220;message_logs&#8221; in left hand drop down<\/li>\n<li>set value of this setting to &#8220;false&#8221;<\/li>\n<li>click blue &#8220;Save&#8221; button down the bottom of webpage to complete the steps here<\/li>\n<\/ol>\n<p>You may find this is a web server configuration of interest to you too.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d42075' onclick='var dv=document.getElementById(\"d42075\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/cpanel\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d42075' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d51359' onclick='var dv=document.getElementById(\"d51359\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/exim\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d51359' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>To send an email often relies on a Mail Server and accompanying software and hardware and networking to support just such a Mail Server. Here at our Linux web server (CentOS) here at RJM Programming we oversee an Exim Mail &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/centos-exim-mail-server-sanity-check-testing-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,12,18,25,29,33,37],"tags":[69,195,234,380,2751,2730,707,716,738,2240,739,932,3535,3536,1253,1319,1411],"class_list":["post-51359","post","type-post","status-publish","format-standard","hentry","category-ajax","category-elearning","category-hardware","category-networking","category-operating-system","category-software","category-tutorials","tag-ajax","tag-centos","tag-command-line","tag-email","tag-exim","tag-formdata","tag-linux","tag-log","tag-mail","tag-mail-server","tag-mailto","tag-php","tag-sanity-check","tag-test","tag-testing","tag-tutorial","tag-web-server"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/51359"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=51359"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/51359\/revisions"}],"predecessor-version":[{"id":51366,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/51359\/revisions\/51366"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=51359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=51359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=51359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}