interesting mail problem
Dave Hammond
daveh at marob.MASA.COM
Mon Feb 13 23:11:43 AEST 1989
In article <705 at vector.UUCP> chip at vector.UUCP (Chip Rosenthal) writes:
>Smail is treating these diagnostics as mail headers. I haven't fixed this
>yet. I see a couple of approaches:
>
>(1) Throw away /bin/mail and let cron work through SCO's /usr/bin/mail.
> A giant step backwards.
>
>(2) Force a blank line or a mail header at the top output from my "cron"
> tasks. Ugly. This means mail messages even when there is output.
>
>(3) Handle the output directly inside the cron task rather than letting cron
> do it. Kind of a pain in the neck.
Not such a pain, in the face of (1) returning to the old mailer, or
(4) replacing cron. I'd redirect fd 2 to a log file, then mail the
log file to root (or whoever). I don't know particulars of your cron
task, but if standard output is likewise undesireable, a quick fix is:
cron_task 2>&1 |mail root
For situations like this it would be handy to be able to redirect a
particular file descriptor to a pipeline, something on the order of:
cron_task |<2 mail root
--
Dave Hammond
daveh at marob.masa.com
More information about the Comp.unix.xenix
mailing list