Changing E-Mail Log File Delivery

Modification of outgoing email for log files.

The following allows you to change the configuration of the exim email handling process to allow sending the email reports to a different email server.

You may find your ISP does not allow email to originate from the ZoneCD so you would need to change the email SMTP server or the ISP may not allow SMTP email to originate from “outside” the domain you are on so you would need to make the changes to allow the email to go out through the ISP SMTP system (email system).

A second issue you may encounter is the ISP requires authentication in order to allow sending email through the ISP’s email system.   You can configure the email system on the zonecd machine to handle the authentication.

Here are the steps required to make the modifications to the email system on he zonecd machine:

We need to modify the mail server configuration:

1. open the current default configuration file for editing using the following command:

nano -w /etc/exim/exim.conf

[insert changes needed here]

NOTE:  Make sure each section of exim.conf closes with:

End

on its own line.

It’s very easy to knock one of these out accidentally and then get a syntax error when you try to restart exim.

Exit nano with CTRL-X, “Y” to the prompt to save changes.

If you want to try it out (recommended), you need to restart the exim email server in order for the changes you made to take effect – issue the following command to restart exim:

sh /etc/init.d/exim restart

And then try to send yourself a log file with the mutt command.

mutt [rest of command here]

Now, once you know it works, it’s important to make sure you don’t have to do this again. The zonece system is a “LiveCD” system which means the normal configuration is read from the CD each time the system is rebooted or started.  What this means is we MUST save the configuration information to the floppy disk or USB thumbdrive and set up a script to load the file you just created into the proper place in the system when the system is rebooted.

Below are the steps needed to perform this bit of magic:

Make a copy of the modified configuration file o the floppy storage area:

cp /etc/exim/exim.conf /mnt/floppy

Now – we need to configure a script file that will install the configuration file and restart the exim mail server for us each time the system is powered up or rebooted:


cd /mnt/floppy/zonecd
nano -w pre.sh

Enter the following into the new file:

#!/bin/sh
echo “running pre.sh now — resetting mail server with local config”
rm /etc/exim/exim.conf
cp /mnt/floppy/exim.conf  /etc/exim/exim.conf
/etc/init.d/exim restart
echo “exim reconfigured”

Exit nano with CTRL-X, “y” to save changes.

Now we have to make the script executable:

chmod +x pre.sh

That ought to make everything work again when you restart.

Leave a Reply

You must be logged in to post a comment.