Bug#119137: Mail from cron jobs (Re: Bug#119137: cricket: Mail from cron not redirected)
On Sun, Nov 11, 2001 at 03:11:56PM +0000, Mark Brown wrote:
> cricket installs a cron job to collect stats and do updates. With some
> errors this will generate output to stdout and/or stderr. Since there's
> no other configuration cron then delivers this output to the cricket
> user where it's likely to get ignored.
>
> The cron.d file ought to redirect the output elsewhere - specifying a
> target for mail or redirecting the output to a log file somewhere.
There doesn't seem to be a consensus on the right way to do this.
- Add an alias to /etc/aliases pointing to root, and let the user change it
if they want. This is what postgres and several other programs do
- Prompt the user for an address, and add that to /etc/aliases. Hylafax
does this.
- Set MAILTO in the cron.d snippet, pointing to root, and allow the user to
change it (it's a conffile)
- Just pass through error output along with normal output to the logfile.
This was the approach taken by previous versions of the cricket package,
before collect-subtrees was used (which has the ability to filter errors).
This has the disadvantage that there is no asynchronous notification of
errors.
- Leave things the way they are, and expect the user to alias cricket
appropriately. This doesn't seem like a good idea.
Policy doesn't seem to specify any particular behavior, though it might be a
good idea for it to do so.
--
- mdz
Reply to: