Sendmail question
Terry Polzin
foxec208 at wowway.com
Mon Aug 9 20:47:56 UTC 2010
On Mon, 2010-08-09 at 13:26 -0700, Wolfgang S. Rupprecht wrote:
> Terry Polzin <foxec208 at wowway.com> writes:
> > Is there a way to configure sendmail NOT to send messages with empty
> > bodies?
>
> Sendmail is an MTA. It isn't a good idea for the MTA to second guess
> intentions. Yes, some other OS's might do things that way, but that
> isn't the un*x way. If you have a program that sometimes generates
> output that should be mailed off you can easily have it capture the
> output in a file and only mail that file if the file is no-zero.
>
> programname > /tmp/log$$ 2>&1
> if [ -n /tmp/log$$ ]
> then
> /bin/mail -s "programname run at $(date)" username
> fi
> /bin/rm /tmp/log$$
>
> --
> Wolfgang S. Rupprecht http://www.wsrcc.com/wolfgang/ (IPv6-only)
yes, I figured this might be the responses I would get. But I (root)
doesn't "own" the script. It's a (poorly) written user script <sigh>.
I'm not allowed (at work) to control the users or the programmers
<another sigh>
More information about the users
mailing list