diff --git a/postfix_mailqueue b/postfix_mailqueue index 0d847ba..0db064d 100755 --- a/postfix_mailqueue +++ b/postfix_mailqueue @@ -80,6 +80,9 @@ munin-node. =cut MAILLOG=${maillog:-/var/log/mail.log} +MINUTES=${minutes:-5} +OUTGOING_REGEX=${outgoing_regex:-postfix/smtp\[.*status=sent} +INCOMING_REGEX=${incoming_regex:-postfix/pipe\[.*status=sent} # atempt to get spooldir via postconf, but environment overrides. @@ -89,9 +92,9 @@ SPOOLDIR=${spooldir:-$POSTCONFSPOOL} . $MUNIN_LIBDIR/plugins/plugin.sh -syslog5mins() { - #for (( i = 4; i >= 0; i-- )) ; do - for i in 4 3 2 1 0; do +syslogXmins() { + for (( i = $MINUTES; i > 0; i-- )) ; do + #for i in 4 3 2 1 0; do # In %_d the underscore is important since it demands `date` # to pad with spaces (like syslog for e.g. "Jan 1" to "Jan 9") # instead of zeros. @@ -144,10 +147,10 @@ cd $SPOOLDIR >/dev/null 2>/dev/null || { } cat <