[Mailman-Users] problem with cron jobs

Jon Jacobsen jonj at atwk.com
Wed Mar 9 22:59:03 CET 2005

It seems that /var/mailman/cron/crontab.in gets copied to 
/etc/cron.d/mailman when mailman is started. These files are the same 
and I have not modified them. It does appear that the Redhat cron is 
having a problem executing the script as mailman user.

John Dennis wrote:
> On Wed, 2005-03-09 at 12:07 -0700, Jon Jacobsen wrote:
>>I installed a Redhat rpm mailman-2.1.5-23 on a Redhat enterprise server. 
>>The mailman appears to be working, but I'm having problems with cron. 
>>When the job run root posts to the 'mailman' list I created the following:
>>/bin/sh: line 1: mailman: command not found
>>I have no errors with 'check_perms' and /etc/cron.d/mailman looks fine. 
>>I can run:
>>#su - mailman -c "/var/mailman/cron/gate_news"
>>without errors.
>>Any Ideas?
> There is a difference between the format of cron jobs created with
> crontab vs. what is the system cron files located in /etc/cron.d. That
> difference is the insertion of the username (uid) that the cron job is
> to be run as. The username is inserted after the 5 time fields and
> before the command. Look at the file /etc/cron.d/mailman, you'll see
> lines that look something like this:
> 0 5 1 * * mailman /usr/lib/mailman/cron/mailpasswds
> Note that the 6th field is the username "mailman" which is the user the
> command is supposed run with the privileges of. ONLY files
> in /etc/cron.d have this extra field. If you installed the cron jobs
> using the command "crontab" using a file that has this format (recall
> that crontab files DO NOT have the username in them, its specified as an
> argument to crontab (e.g. -u) then cron will be confused into thinking
> the command is "mailman" because the 6th entry in a crontab file is the
> command (its the 7th entry in a system cron file).
> This is the most likely cause of the symptom you report. The rpm is
> supposed to correctly handle the cron installation and is aware of the
> difference between "system cron files" and files passed to crontab (of
> course there might be an rpm bug, especially if you didn't manually try
> to modify what the rpm installation did).
> I just spoke with the cron maintainer here who said there were some
> versions of cron in RHEL3 (which is the distribution your mailman rpm
> came from) that had some bugs. You could try updating your version of
> cron and see if that helps, but it really sounds to me like a mismatch
> of the cron formats.

More information about the Mailman-Users mailing list