[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SAGE] Output from "cron" command
On 2003-04-28 at 20:27 -0400, John Mahoney wrote:
> I've been using this little perl script (called mailif)
> to direct cron errors to the appropriate location for
> sometime now - I like it a lot. I can
I like the grep stuff. If anyone's interested, I have a similar sort of
script which takes a slightly different approach, in that it runs the
target command as a child, passing arguments, much as nice(1) does.
Most critical reason for doing this is that I can actually be told when
a command fails -- mailwrap(1) reports non-zero exit codes, reports
aborts on signals and core-dumps. I've seen too many commands which
produce no output when failing, but do leave an exit-code to indicate a
problem.
Optional fork/detach. Much control of mail headers and SMTP Envelope
Sender. Calls system mailer directly, feeding it a message. Actually
codes for "exim", but that's simply because that's the MTA we use;
should work just fine with sendmail, since it's the Sendmail interface
used. Is very paranoid about not allowing address insertion through
header manipulation.
mailwrap(1) available upon request.