NAME

dumpnet.reportmail.conf - the host-specific dumpnet.host.reportmail configuration file


DESCRIPTION

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:

reportDir
The name of the sub-directory where the report files can be found: $backupDir/$host/$reportDir. It is recommended to go with the default configured in the default host configuration file: ``report''. You will have to set this option if you specified an alternative reportDir in your dumpnet.report.conf.

read_options
Options to be passed to the bash builtin read to read in the configuration file. In some cases you will want to use the -r option which causes the backslash not to act as an escape character. The backslash is considered to be part of the line. In particular, a backslash-newline pair may not be used as a line continuation. If read_options is not set (or set to an empty string) a backslash-newline pair can be used as a line continuation but all literal backslashes will have to be escaped. Example:
 # option read_options="-r"


EXAMPLES

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


SEE ALSO

 dumpnet.host(8)
 dumpnet.host.reportmail(8)


AUTHOR

 Lukas Feiler <lukas.feiler@lukasfeiler.com>


COPYRIGHT AND LICENSE

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.