CentOS Exim Mail Server Sanity Check Testing Tutorial

CentOS Exim Mail Server Sanity Check Testing Tutorial

CentOS Exim Mail Server Sanity Check Testing Tutorial

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 CentOS Exim Advanced Configuration Primer Tutorial.

In the normal case of events “exim” does its job sending and receiving email related to email addresses ending in “@rjmprogramming.com.au” 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 “go through to the keeper” (so to speak). But they weren’t, and the issue concerned an email sent via PHP mail using a sender whose email address ended in “@rjmprogramming.com.au” so the Exim Mail Server comes into play (unlike a client email application mailto: type of email).

We were using Ajax/FormData techniques to send the email and according to error checking at this client end of things, “no worries”. PHP logs? No apparent issues. So what next?

Thanks, Gooooooooggggggllllllee led us to the incredibly useful send a testmail via exim – makandra Operations, thanks, getting us to


# exim -v rmetcalfe41@gmail.com
From: rmetcalfe@rjmprogramming.com.au
Subject: Foobar
Text Text Text

I like Pie!
<Command(Mac)/Ctrl(Windows)+D>

… the results of actions above helping us see what the issues were, holding up the email. Much later it (ie. the original email) arrived, as well as …


Previous relevant CentOS Exim Advanced Configuration Primer Tutorial is shown below.

CentOS Exim Advanced Configuration Primer Tutorial

CentOS Exim Advanced Configuration Primer Tutorial

There are two file resource aspects to watch out for regarding a web server hard disk storage …

  • hard disk space
  • hard disk inode count (for Linux and unix web servers)

… which can, respectively, be monitored by Linux commands …

  • df -k /
  • df -i /

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 …

  • find /var -xdev -type f -size +100M
  • find /var -mtime -1 -ls

… 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’s where we found out this way that our Exim Mail Server logs extensively, and that we could do without those in folders off …


/var/spool/exim/msglog/

We tried the latter of two deletion ideas we show below …

  • all at once via …

    cd /var/spool/exim
    find msglog -type f -exec rm -rf {} \;
  • broken up … via a series of deletions of the ilk …

    cd /var/spool/exim/msglog
    rm -f A/*
    rm -f a/*

Then the next job was to stop Exim remaking these logs and wish to thank this useful link for great advice here, that led to this advice we give …

  1. log in to WHM cPanel
  2. in search bar type “Exim”
  3. click the “Exim Configuration Manager”
  4. click “Advanced Editor” tab (up the top)
  5. click the blue “Add additional configuration setting” button well down the webpage
  6. click “message_logs” in left hand drop down
  7. set value of this setting to “false”
  8. click blue “Save” button down the bottom of webpage to complete the steps here

You may find this is a web server configuration of interest to you too.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in Ajax, eLearning, Hardware, Networking, Operating System, Software, Tutorials and tagged , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>