[Mailman-Users] Cron command?

Lindsay Haisley fmouse at fmp.com
Tue Apr 21 18:11:21 CEST 2015


On Tue, 2015-04-21 at 18:46 +0300, Danil Smirnov wrote:
> 2015-04-21 17:43 GMT+03:00 Danil Smirnov <danil at smirnov.la>:
> > 2015-04-21 17:24 GMT+03:00 Lindsay Haisley <fmouse at fmp.com>:
> >> so a direct copy of the
> >> Mailman crontab to this directory can't be done without modifying the
> >> file.
> 
> You are right but not because of improper format of crontab.in file:

Files in /etc/cron.d/ require an additional field, the user account to
which the crontab file belongs.  From the man page for cron(8) for
Ubuntu:

        Additionally,  in  Debian,  cron reads the files in
        the /etc/cron.d
        directory.  cron treats the files in /etc/cron.d as in the same
        way
        as  the  /etc/crontab  file (they follow the special format of
        that
        file, i.e. they include the user field).
        
Records in mailman.in don't have the user field, e.g.

        27 3 * * * /usr/bin/python
        -S /usr/lib64/mailman/cron/nightly_gzip

It could be manually added, but the best way to incorporate the Mailman
crontab is to pull it into the crontab editor (crontab -e), which will
put them in the cron spool directory.

"Improper" is perhaps to strong a word.  "Incorrect" might have been a
better choice.

> 
> # 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).
> #
> # The reason this is done this way is because the mailman cron jobs
> # should only be invoked if the mailman service is enabled and not
> # just as a consequence of installing the rpm as was the case
> # previously. The file /etc/cron.d/mailman cannot simply be linked to
> # the master copy in /usr/lib/mailman/cron because for security reasons cron
> # will not process crontab files that are links or writeable by
> # anybody else but root, thus the file must be copied into /etc/cron.d
> # with the right ownership and permissions.
> 
> Danil
> ------------------------------------------------------
> Mailman-Users mailing list Mailman-Users at python.org
> https://mail.python.org/mailman/listinfo/mailman-users
> Mailman FAQ: http://wiki.list.org/x/AgA3
> Security Policy: http://wiki.list.org/x/QIA9
> Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
> Unsubscribe: https://mail.python.org/mailman/options/mailman-users/fmouse%40fmp.com

-- 
Lindsay Haisley       | "The only unchanging certainty
FMP Computer Services |    is the certainty of change"
512-259-1190          |
http://www.fmp.com    | - Ancient wisdom, all cultures



More information about the Mailman-Users mailing list