Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Nov 2012 10:01:20 +0000 (UTC)
From:      Eygene Ryabinkin <rea@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r307267 - head/mail/exim/files
Message-ID:  <201211101001.qAAA1Kjr078692@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rea
Date: Sat Nov 10 10:01:20 2012
New Revision: 307267
URL: http://svnweb.freebsd.org/changeset/ports/307267

Log:
  mail/exim: add exim_tidydb_filter for periodic tidydb job
  
  It allows to filter/transform the output from the tidydb that is
  sometimes large and not very much suitable for informational mails
  from cron.
  Feature safe:	yes

Modified:
  head/mail/exim/files/150.exim-tidydb.sh

Modified: head/mail/exim/files/150.exim-tidydb.sh
==============================================================================
--- head/mail/exim/files/150.exim-tidydb.sh	Sat Nov 10 09:53:50 2012	(r307266)
+++ head/mail/exim/files/150.exim-tidydb.sh	Sat Nov 10 10:01:20 2012	(r307267)
@@ -16,12 +16,13 @@ fi
 
 : ${exim_tidydb_enable="YES"}
 : ${exim_tidydb="%%PREFIX%%/sbin/exim_tidydb"}
+# Set this to arbitrary shell command to filter
+# the output from this periodic script, for example,
+# exim_tidydb_filter="| tail -100".
+: ${exim_tidydb_filter=""}
 : ${exim_dbdir="/var/spool/exim"}
 
-case "$exim_tidydb_enable" in
-    [Yy][Ee][Ss])
-	echo ""
-	echo "Tidying Exim hints databases:"
+tidy () {
 	for db in "$exim_dbdir"/db/*.lockfile; do
 	    [ "$db" = "$exim_dbdir/db/*.lockfile" ] && continue
 	    echo
@@ -30,6 +31,13 @@ case "$exim_tidydb_enable" in
 	        "$exim_tidydb" "$exim_dbdir" "$db_name"
 	    fi
 	done
+}
+
+case "$exim_tidydb_enable" in
+    [Yy][Ee][Ss])
+	echo ""
+	echo "Tidying Exim hints databases:"
+	eval tidy "$exim_tidydb_filter"
 	rc=1;;
 
     *)  rc=0;;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211101001.qAAA1Kjr078692>