aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorEygene Ryabinkin <rea@FreeBSD.org>2012-11-10 10:01:20 +0000
committerEygene Ryabinkin <rea@FreeBSD.org>2012-11-10 10:01:20 +0000
commit359f35d0063cc89e527470e366dad541fc873acb (patch)
tree571166db855c9d90729cb2022e4843e28eea615a /mail
parentf11416edfabd8c6aadc08292fc9177805f52f847 (diff)
downloadports-359f35d0063cc89e527470e366dad541fc873acb.tar.gz
ports-359f35d0063cc89e527470e366dad541fc873acb.zip
Notes
Diffstat (limited to 'mail')
-rw-r--r--mail/exim/files/150.exim-tidydb.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/mail/exim/files/150.exim-tidydb.sh b/mail/exim/files/150.exim-tidydb.sh
index 7f6522b24a9e..95a49c088b4f 100644
--- a/mail/exim/files/150.exim-tidydb.sh
+++ b/mail/exim/files/150.exim-tidydb.sh
@@ -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;;