Package: mailscanner
Version: 4.51.5-1.1
Severity: important
The logrotate script shipped with mailscanner is wrong. It look on the wrong
directory.
# have exim update it's database (if we're using exim, that is)
if [ -x /usr/sbin/exim_tidydb -a -d /var/spool/exim_incoming ]; then
/usr/sbin/exim_tidydb -t 0m /var/spool/exim_incoming retry >/dev/null
fi
The directory should be exim4_incoming not exim_incoming.
But a script as the one used in cron.daily exim-config will be better.
----------------------------------------------
SPOOLDIROUT="/var/spool/exim4"
# go to mailscanner spool directory
cd /var/spool/MailScanner
cd $SPOOLDIROUT/db || exit 1
if ! find $SPOOLDIROUT/db -maxdepth 1 -name '*.lockfile' -or -type f \
-printf '%f\0' | \
xargs -0r -n 1 \
start-stop-daemon --start --exec /usr/sbin/exim_tidydb \
--chuid Debian-exim:Debian-exim -- $SPOOLDIROUT > /dev/null; then
# if we reach this, invoking exim_tidydb from start-stop-daemon has
# failed, most probably because of libpam-tmpdir being in use
# (see #373786 and #376165)
find $SPOOLDIROUT/db -maxdepth 1 -name '*.lockfile' -or -type f \
-printf '%f\0' | \
su - --shell /bin/bash \
--command "xargs -0r -n 1 /usr/sbin/exim_tidydb $SPOOLDIROUT >
/dev/null" \
Debian-exim
fi
fi
----------------------------------------------
But in fact, we have a general problem.
The script /etc/cron.daily/exim4-base, already looks in exim4_incoming thrue
the commands:
SPOOLDIR="$(exim4 -bP spool_directory | sed 's/.*=[[:space:]]\(.*\)/\1/')"
And in both case logs in exim4 and exim4_incoming or exim4 are not well
rotated.
We need need to decide the best to do.
1) Update the /etc/cron.daily/exim4-base script to look on both directory
for logs and tidydb if mailscanner is installed,
2) Update the mailscanner logrotate script to well handle the log rotate and
exim_tidydb update for mailscanner additions.
Cheers,
Stef...
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]