Bering-uClibc 4.x - User Guide - Basic Configuration - Email Alerts

From bering-uClibc
Revision as of 21:01, 24 December 2011 by Davidmbrooke (Talk | contribs) (Created)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Basic Configuration - Email Alerts
Prev Bering-uClibc 4.x - User Guide Next


Introduction

Bering-uClibc 4.x includes some basic functionality for checking system status and sending email alerts to an Administrator if something needs attention. The standard checks include:

  • Low free space on a disk partition.
  • Ping failure for one of a defined list of hosts.

This functionality relies on BusyBox sendmail (installed as /usr/sbin/sendmail) which is very much cut-down compared to "normal" sendmail and is effectively just a simple mail client rather than a full Mail Transfer Agent (MTA). It is necessary to configure the mail client to connect directly to an SMTP server running elsewhere on the network.

Note that BusyBox sendmail has different command-line arguments from standard sendmail.

Preparation

Much of the complexity of configuring email alerts is driven by the demands of the SMTP server selected, in particular whether it demands Authentication.

The configuration described below assumes a mail server running on the Internal network.

If Shorewall is running, the sending of email from the firewall itself will probably not be permitted by the default firewall rules so a new entry needs to be added to /etc/shorewall/rules - something like the following:

#       Allow SMTP traffic from firewall to internal zone mail server
SMTP(ACCEPT)    fw      loc

It is best to check the connection with the selected mail server manually before configuring automatic alerts. Run the following command as a test, substituting my_mailserver (hostname or IP address) and my_administrator_email_address (email address) with correct values for your site:

sendmail -S my_mailserver -f root@firewall my_administrator_email_address

then enter one or more lines of email text, terminating with ^D.

In the event of problems, add the "-v" argument for verbose output to aid debugging.

Configuration

TODO



Prev Up Next