> Actually, I have figured out how to do this. I put a file in cron.d:
>
> 00 2 * * * root (diff maillist maillist.bak | mail -s "Daily
> majordomo output from BQ Server" admin (at mark) domain.com | cp -f maillist
> maillist.bak)
>
> This works great, with one exception: if there is no diff output, the
> command will send a blank email message to admin (at mark) domain.com. What should I
> do to avoid sending a message if the diff results are null?
If you just execute a cronjob, and don't pipe it through the mail
command, it automatically sends an email if any output is generated,
and will remain silent if there is no output (the mail captures
anything that would be sent to an interactive shell session if you
issued the same command).
Cron automatically sends the emails to root (at mark) though, not admin (at mark) . But I
think everything to root is auto-forwarded to admin anyway...