#1143883 mailman3: Incorrect shell syntax in crontab entries

#1143883#5
Date:
2026-08-07 19:19:52 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

I installed mailman3 and imported an existing setup using mailman2  mostly
successfuly.

One provlem I am still facing is that the daily cron jobs do not work.  I get
email from cron daemon like e.g.

Subject: Cron <root@foo> list if [ -x /usr/bin/mailman ]; then /usr/bin/mailman digests --periodic; fi

/bin/sh: 1: Syntax error: "then" unexpected


Looking at /etc/cron.d/mailman3, the relevant lines are:

# At 12AM, send mail digests for lists that do periodic as well as threshold delivery
0 12 * * *  list        if [ -x /usr/bin/mailman ]; then /usr/bin/mailman digests --periodic; fi


It seems crontab uses ; as a separator and this breaks the command,  Instead,
the entire command should be quoted and run with /bin/sh -c

The same applies to the other job in this file.

#1143883#10
Date:
2026-08-08 17:21:18 UTC
From:
To:
Maybe that's not it.  I'm still getting the same error message from the
cron jobs.