Subject: Re: Bug#873927: amavisd-new-cronjob returns unknown cron routine when bayes is

From: Brian May <[email-masked]>
Date: Sun, 03 Sep 2017 17:00:32 +1000

Alexander Bachmer - rockenstein AG <[email-masked]> writes:

> root@host:/tmp# cat /etc/cron.d/amavisd-new
> #
> #  SpamAssassin maintenance for amavisd-new
> #
> # m h dom mon dow user  command
> 18 */3  * * *   amavis  test -e /usr/sbin/amavisd-new-
> cronjob && /usr/sbin/amavisd-new-cronjob sa-sync
> 24 1  * * *   amavis  test -e /usr/sbin/amavisd-new-cronjob &&
> /usr/sbin/amavisd-new-cronjob sa-clean
>
>
>
> As user amavis:
> $ /usr/sbin/amavisd-new-cronjob && /usr/sbin/amavisd-new-cronjob sa-
> sync
> /usr/sbin/amavisd-new-cronjob: unknown cron routine 

errr... No. That is not the command from the crontab. The correct
command is:

test -e /usr/sbin/amavisd-new-cronjob && /usr/sbin/amavisd-new-cronjob sa-sync

i.e. we only execute the command if it is installed.

> 18 */3  * * *   amavis  test -e /usr/sbin/amavisd-new-
> cronjob sa-sync && /usr/sbin/amavisd-new-cronjob sa-sync
> 24 1  * * *   amavis  test -e /usr/sbin/amavisd-new-cronjob sa-clean &&
> /usr/sbin/amavisd-new-cronjob sa-clean

Passing "test -e" more then one parameter doesn't make sense.

I don't know why you might be getting errors from the cronjob, however I
think you are going to have to rethink your diagnoses. Or send me the
actual error cron in giving you.
-- 
Brian May <[email-masked]>