summaryrefslogtreecommitdiff
path: root/network/exim/contrib/exim.cron
diff options
context:
space:
mode:
Diffstat (limited to 'network/exim/contrib/exim.cron')
-rw-r--r--network/exim/contrib/exim.cron6
1 files changed, 3 insertions, 3 deletions
diff --git a/network/exim/contrib/exim.cron b/network/exim/contrib/exim.cron
index 94d7442b60..b4b7751ea8 100644
--- a/network/exim/contrib/exim.cron
+++ b/network/exim/contrib/exim.cron
@@ -7,6 +7,6 @@ SPOOL=/var/spool/exim
test -d $SPOOL -a -x /usr/sbin/exim_tidydb || exit
# Tidy up the contents of the hints databases
-find $SPOOL/db -name '*.lockfile' -exec basename {} .lockfile \; \
- | xargs -r -n 1 sudo -u exim /usr/sbin/exim_tidydb -t 7d $SPOOL \
- > /dev/null
+find $SPOOL/db -type f \! -name '*.lockfile' -printf '%f\0' \
+ | xargs -0 -I {} -n 1 -r su exim -s /bin/sh -c \
+ "/usr/sbin/exim_tidydb -t 7d $SPOOL {} > /dev/null"