[Mailman-Users] Question on cron.in and the init.d scripts in rpm file

steve flynnibus at yahoo.com
Fri Jan 4 16:04:41 CET 2008

Hello all, setting up mailman on linux 2.6.9 where mailman was installed I believe by a rpm file.

The question is about the cron job.  The documentation says to install the contents of the supplied file into the cron job of the user mailman

    % cd $prefix/cron
    % crontab -u mailman crontab.in
Upon doing so, I got error messages from the cron job when it ran

/bin/sh: mailman: command not found

The cron entry failing looks like this
0,5,10,15,20,25,30,35,40,45,50,55 * * * * mailman /usr/lib/mailman/cron/gate_news

The syntax didn't look right to me because, what was 'mailman' doing there at the start of the command?  the shell setup by cron can not find the mailman executable because its not installed in /usr/bin or /usr/sbin .  My install is into /usr/lib/mailman and /var/lib/mailman

Mark Sapiro offers an explanation in this archived message from the list

Saying its due to a package setup and just remove 'mailman'.  I can do that, but reading the actual crontab.in file supplied suggests that the cronjob is automatically setup and torn down by the init.d script

# This file is copied to /etc/cron.d/mailman from
# /usr/lib/mailman/cron/crontab.in when the mailman service is started via its
# init.d script and the file /etc/cron.d/mailman is removed when the
# service is stopped.  Therefore any edits made directly to
# /etc/cron.d/mailman will be lost anytime the mailman service
# restarts.
# To make changes edit the master copy /usr/lib/mailman/cron/crontab.in and then
# restart the service to pick up the changes (/sbin/service mailman restart).

Ok - makes sense.. so I should edit the file in /usr/lib/mailman/cron/crontab.in and the script will update the actual cron job when the service is started..

So, I'll edit out mailman in /usr/lib/mailman/cron/crontab.in - but is this something lacking in the documentation?  I don't understand why the crontab.in file has that extra mailman in each of the lines of the crontab.  Does it serve a purpose for other installation types?

Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

More information about the Mailman-Users mailing list