[Mailman-Users] Cron

Dave Sherohman esper at sherohman.org
Mon Aug 27 22:57:48 CEST 2001

On Mon, Aug 27, 2001 at 04:36:10PM -0400, Greg Ward wrote:
> On 27 August 2001, Jeff Baldwin said:
> > On my server users are not allowed to enter/edit crontabs... will it
> > harm the operation of MailMan if I were to put the contents of
> > "crontab.in" into my system cron (/etc/crontab) versus doing the
> > "crontab crontab.in" as user mailman?
> Dangerous -- those jobs would then run as root, which makes having a
> "mailman" user rather pointless.

This is incorrect.  You're thinking of user crontabs (edited using
the crontab command and stored in a location which can only be
learned by reading the rlevant man pages).  System crontabs, such as
/etc/crontab and the files in /etc/cron.[d|daily|monthly|weekly],
have an additional field which specifies the user that the command
should be run as.

To get back to the original question, Jeff describes something very
similar to how debian handles it.  Debian creates the file
/etc/cron.d/mailman with the contents:

*/5 * * * *    list    [ -x /usr/bin/python -a -f /usr/lib/mailman/cron/gate_news ] && /usr/bin/python /usr/lib/mailman/cron/gate_news
* * * * *       list    [ -x /usr/bin/python -a -f /usr/lib/mailman/cron/qrunner ] && /usr/bin/python /usr/lib/mailman/cron/qrunner

Note the additional field, containing "list" (the user debian runs
mailing lists under; replace it with "mailman" for the non-debian
setup), after the time specifier and before the command that is
executed.  These lines would work identically in /etc/crontab.

With the arrest of Dimitry Sklyarov it has become apparent that it is not
safe for non US software engineers to visit the United States. - Alan Cox
"To prevent unauthorized reading..."         - Adobe eBook reader license

More information about the Mailman-Users mailing list