[comp.sys.mips] Forwarding mail from cron

dsg@mbunix.mitre.org (Goldberg) (11/21/90)

I maintain several Unix based systems, including a MIPS RS2030.  One
thing that makes life alot easier for me is to forward mail from root
on all the remote machines to a single account.  That way I don't have
to remember log in to thirty odd machines every day to make sure
everything is OK (thiry odd xload's is sufficient :-).  Anyway, the
problem is on the RS2030.  Cron uses /bin/mail rather than
/usr/ucb/mail to mail the stdout and stderr of cron jobs.  No problem:
I made symbolic link from /usr/ucb to /ucb and edited a copy of the
cron binary to use /ucb/mail.  This works fine for root's crontab.
The problem is the periodic stuff.  That seems to be copied directly
to /usr/mail/root.  I don't see where /bin/mail is entering into it.
Is there any way to get periodic stuff forwarded?  Or should I just
blow it away, and move it into root's crontab file.

Thanks for any help

--
Dave Goldberg                     UNIX Systems Programmer/Administrator
The Mitre Corporation   MS B020  Bedford, MA 01730        617-271-2460
Domain: dsg@mbunix.mitre.org    UUCP: {your neighborhood}!linus!mbunix!dsg 

lgy@phys.washington.edu (Laurence G. Yaffe) (11/21/90)

dsg@mbunix.mitre.org (Goldberg) writes:

-I maintain several Unix based systems, including a MIPS RS2030.  One
-thing that makes life alot easier for me is to forward mail from root
-on all the remote machines to a single account.  That way I don't have
-to remember log in to thirty odd machines every day to make sure
-everything is OK (thiry odd xload's is sufficient :-).  Anyway, the
-problem is on the RS2030.  Cron uses /bin/mail rather than
-/usr/ucb/mail to mail the stdout and stderr of cron jobs.  No problem:
-I made symbolic link from /usr/ucb to /ucb and edited a copy of the
-cron binary to use /ucb/mail.  This works fine for root's crontab.
-The problem is the periodic stuff.  That seems to be copied directly
-to /usr/mail/root.  I don't see where /bin/mail is entering into it.
-Is there any way to get periodic stuff forwarded?  Or should I just
-blow it away, and move it into root's crontab file.

    I don't think this much work is necessary.  As I recall, getting this
to act the way you want should merely require touching /usr/lib/sendmail.ok
into existence and creating an appropriate .forward file for root.
That's all I recall doing and it works fine for me.  (Some of this
appeared somewhere in the OS release notes.) 

-Thanks for any help

-Dave Goldberg                     UNIX Systems Programmer/Administrator
-The Mitre Corporation   MS B020  Bedford, MA 01730        617-271-2460
-Domain: dsg@mbunix.mitre.org    UUCP: {your neighborhood}!linus!mbunix!dsg 

--
--------------------------------------------------------------------------
Laurence G. Yaffe		Internet: lgy@newton.phys.washington.edu
University of Washington	Bitnet:   yaffe@uwaphast.bitnet

dsg@mbunix.mitre.org (Goldberg) (11/27/90)

In article <lgy.659136365@newton> lgy@phys.washington.edu (Laurence G. Yaffe) writes:

   dsg@mbunix.mitre.org (Dummy who forgot to RTFM :-) writes:

   -I maintain several Unix based systems, including a MIPS RS2030.  One
   -thing that makes life alot easier for me is to forward mail from root
   -on all the remote machines to a single account.  That way I don't have
   -to remember log in to thirty odd machines every day to make sure
   -everything is OK (thiry odd xload's is sufficient :-).  Anyway, the
   -problem is on the RS2030.  Cron uses /bin/mail rather than
   -/usr/ucb/mail to mail the stdout and stderr of cron jobs.  No problem:
   -I made symbolic link from /usr/ucb to /ucb and edited a copy of the
   -cron binary to use /ucb/mail.  This works fine for root's crontab.
   -The problem is the periodic stuff.  That seems to be copied directly
   -to /usr/mail/root.  I don't see where /bin/mail is entering into it.
   -Is there any way to get periodic stuff forwarded?  Or should I just
   -blow it away, and move it into root's crontab file.

       I don't think this much work is necessary.  As I recall, getting this
   to act the way you want should merely require touching /usr/lib/sendmail.ok
   into existence and creating an appropriate .forward file for root.
   That's all I recall doing and it works fine for me.  (Some of this
   appeared somewhere in the OS release notes.) 

Damn, I'd forgotten about that.  I had it working under 4.10 and
forgotten how.  Sendmail.ok is the answer.  It works like a champ.

Thanks,
--
Dave Goldberg                     UNIX Systems Programmer/Administrator
The Mitre Corporation   MS B020  Bedford, MA 01730        617-271-2460
Domain: dsg@mbunix.mitre.org    UUCP: {your neighborhood}!linus!mbunix!dsg