Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cmcl2!phri!marob!daveh From: daveh@marob.MASA.COM (Dave Hammond) Newsgroups: comp.unix.xenix Subject: Re: interesting mail problem Message-ID: <550@marob.MASA.COM> Date: 13 Feb 89 13:11:43 GMT References: <705@vector.UUCP> Reply-To: daveh@marob.masa.com (Dave Hammond) Organization: ESCC New York City Lines: 28 In article <705@vector.UUCP> chip@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@marob.masa.com