Wydawca (split by node):   Section:   Chapter:FastBack: configuring   Up: mod_mailutils   FastForward: wydawca.conf   Contents: Table of ContentsIndex: Concept Index

4.15.3.5 Example of mod_mailutils configuration

This subsection provides a complete example for mod_mailutils configuration.

module mailutils mod_mailutils.la;

module-init mailutils {
    admin-address "root@example.net";
    from-address "wydawca@example.net";
    mailer "sendmail:";

    mail-statistics {
        statistics all;
        message <<- EOT
    Subject: upload statistics

    This is to notify you that the run of wydawca on ${date}
    caused the following results:

    errors ............................. ${stat:errors}
    warning ............................ ${stat:warnings}
    bad signatures ..................... ${stat:bad_signatures}
    access violation attempts .......... ${stat:access_violations}
    complete triplets .................. ${stat:complete_triplets}
    incomplete triplets ................ ${stat:incomplete_triplets}
    bad triplets ....................... ${stat:bad_triplets}
    expired triplets ................... ${stat:expired_triplets}
    triplet successes .................. ${stat:triplet_success}
    files uploaded ..................... ${stat:uploads}
    files archived ..................... ${stat:archives}
    symlinks created ................... ${stat:symlinks}
    symlinks removed ................... ${stat:rmsymlinks}
    verification failures .............. ${stat:check_failures}

    Regards,
    Wydawca
    EOT;
    }
}

notify-event {
    event statistics;
    module mailutils;
}

notify-event {
    event success;
    module mailutils;
    module-config {
        recipient user;
        message <<- EOT
           Subject: Upload of ${project} successful

           Upload of ${project} to ${url}/${dir} finished successfully.
           Files uploaded:

           ${triplet:ls:upload}

           Regards,
           Wydawca
           The Project Submission Robot
        EOT;
    }        
}

For the sake of brevity, this example defines only two notify-event statements. More statements for others events can be added as needed.