dumpnet.reportmail.conf - the host-specific dumpnet.host.reportmail configuration file
A dumpnet.reportmail.conf file is used to configure the module dumpnet.host.reportmail for a specific target host. It should be placed in a host configuration directory (a subdirectory of $DUMPNET_HOME/conf/) - see the CONFIGURATION section in dumpnet(8) for details.
The general format of this configuration file is specified in the section CONFIGURATION FILE FORMAT in dumpnet(8).
This config file primarily contains a list of commands to send a previously generated report via email. The commands you specify have to read the report from STDIN. You are highly encouraged to use a tool like gpg to encrypt and sign your mail before sending it. As the mail contains sensitive information it should be obvious why encryption is essential. Signing it is a good idea as well because it ensures that no one sends faked backup reports to your backup operators. Lines starting with `#' are not part of the list.
If Command actually consists of multiple commands separated by pipes you are highly encouraged to take advantage of the COMMAND_RETURN_CODE feature. If you pipe the output of one command into another command the exit status of the whole expression will be the one of the last command. So you wouldn't notice if anything went wrong with the first command. To solve this problem dumpnet.host.userdefined.cmd will look on STDERR for lines starting with the string ``COMMAND_RETURN_CODE '' followed by a nueric value. If that value is not 0 we know that one of the commands used in the expression failed.
You can certainly use the ``option'' and ``extends'' statements - see the CONFIGURATION FILE FORMAT section in dumpnet(8). Options you might want to set are:
# option read_options="-r"
An example file could look like this:
# command #1: send the unencrypted mail to backupoperator1@example.com; # NOT recommended # command #2: encrypt the mail with the public key of # backupoperator1@example.com and send it to that address # command #3: encrypt the mail with the public key of # backupoperator2@example.com, sign it with the private key # of dumpnet@backup.example.com and send it to # backupoperator2@example.com mail -s "dumpnet report $host (SID$sessionId)" backupoperator1@example.com (gpg -ear backupoperator1@example.com; echo COMMAND_RETURN_CODE $? >&2) | mail -s 'dumpnet report $host (SID$sessionId)' backupoperator1@example.com (gpg -easr backupoperator2@example.com --default-key dumpnet@backup.example.com; echo COMMAND_RETURN_CODE $? >&2) | mail -s 'dumpnet report $host (SID$sessionId)' -r dumpnet@backup.example.com backupoperator2@example.com
dumpnet.host(8) dumpnet.host.reportmail(8)
Lukas Feiler <lukas.feiler@lukasfeiler.com>
dumpnet is published under the LGPL (GNU LESSER GENERAL PUBLIC LICENSE). Please see the LICENSE file contained in the installation tarball for details. The official web site is http://dumpnet.sourceforge.net.