#!@l_prefix@/bin/openpkg rc
##
##  rc.procmail -- Run-Commands
##

%config
    procmail_enable="$openpkg_rc_def"
    procmail_log_epilog="true"
    procmail_log_numfiles="10"
    procmail_log_minsize="1M"
    procmail_log_complevel="9"

%daily -u @l_susr@
    rcService procmail enable yes || exit 0

    #   rotate logfile
    prolog="$procmail_log_prolog"
    epilog="$procmail_log_epilog"
    shtool rotate -f \
        -n ${procmail_log_numfiles} -s ${procmail_log_minsize} -d \
        -z ${procmail_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 644 \
        -P "${prolog}" \
        -E "${epilog}" \
        @l_prefix@/var/procmail/procmail.log

