DNSCHECK-12HOURMAILER(1)

NAME
dnscheck-12hourmailer - email registrars about problems in their domains

DESCRIPTION
This script will look through the "tests" table in the DNSCheck database, pick out the ones that resulted in problems classified at level "CRITICAL" or "ERROR", group the domains thus found by registrar and send each registrar an email listing the problematic zones and some basic information on the problems.

The registrar data is taken from the REGGIE database for the ".se" domain, and thus the script will probably be of limited use to other organisations as is. Other users will almost certainly need to write their own version of the get_registrar_info function. It expects a single domain name as its input, and returns "undef" (if no registrar could be found) or a two-element list with the contact email address for and name of the relevant registrar (in that order).

It might be useful to simply make the function return a fixed list with an email address and a name string, in which case single email with all problems will be sent to the address given.

CONFIGURATION
This script uses the same YAML files as the rest of the DNSCheck system. It looks for its information under the key "12hour". The subkeys it uses are the following.

smtphost
    The full name of the SMTP server to use for sending emails.

from
    The string to put in the "From" line of the sent emails.

subject
    The string to put in the "subject" line of the sent emails.

timespan
    How far into the past the script should look for tests. The value should be a string that will be understood as a time value by MySQL (for example, "12:00:00" is twelve hours, zero minutes and zero seconds).

debug
    A Perl boolean value. If it is true, emails will be printed to standard output instead of sent.

sourcestring
    The string identifying the source of the tests to consider mailing about.