Mail alerts

in

1. Reports

1.1. Mail group for reports

Create the reports mail group in CGP and include postmaster in it. Set group parameters similar to postlords. Make sure this group accepts only internal mailings, and its mailings are not duplicated for postlords. Make report mails stored in a shared mail folder. Go to Users/ourdom.com/postmaster/Mail/Incoming mail rules, add the new reports rule and edit it:

  • Any To or Cc -- in -- reports,reports@*
  • Store in -- ~public/PublicReports
  • Discard

NOTE: I cannot implement this rule at domain level either:group mirroring takes place BEFORE rules are triggered,so this rule is invoked for every group member and thrashes the folder.

1.2. Application adjustments for reports

  • /etc/cron.hourly/hylafax : remove or comment out invocation in it
  • /etc/cron.daly/hylafax :
/usr/sbin/faxcron | mail -s "fax usage report for server.ourdom.com" reports
  • /etc/cron.weekly/hylafax
faxcron ... | mail -n -s "fax cron job (fax2.ourdom.com)" reports@ourdom.com
faxqclean ... | mail -n -s "fax queue clean job (fax2.ourdom.com)" reports
  • /etc/cron.monthly/hylafax
xferfaxstats ... | mail -s "monthly fax stats (fax2.ourdom.com) by destination" reports
xferfaxstats ... | mail -s "monthly fax stats (fax2.ourdom.com) by sender" reports
  • cron reports in /etc/crontab
 MAILTO=reports@ourdom.com
  • anacron reports in etc/anacrontab
MAILTO=reports@ourdom.com
  • decrease spam amount from the drweb updater - currently it starts twice per hour, so edit /var/spool/cron/drweb and replace
11,41  *  *  *  *  /opt/drweb/update.pl

with

1      1  *  *  *  /opt/drweb/update.pl
  • restart crons
service crond reload
service anacron reload
  • edit /etc/log.d/logwatch.conf and set report destination
MailTo = reports@ourdom.com

2. Alerts

  • Make nagios and nagios-admin the postmaster aliases.
  • Edit /etc/nagios/nagios.cfg and set nagios e-mail
admin_email=nagios@ourdom.com
  • Edit /etc/nagios/default.cfg and set destination for alerts
define contact{
  contact_name    nagios-admin
  ...
  email           alerts@ourdom.com
}

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.