SUMMARY: Cron Help + MX question

From: Tru64 User (tru64user@yahoo.com)
Date: Thu Oct 10 2002 - 12:37:48 EDT


Thanks much to Peyton Glands and Tim Cutts, for their
quick suggestions ( i was forcing this to work one
way!, which wasn't!!!!)

For MX problem, local grp working on issue.

For script/cron issue, this oneliner worked (was
looking for a one liner)

You could just do:

30 * * * * /usr/local/bin/dosomething 2>&1 | mailx -s
"dosomething
cron" user1 user2

but that has the disadvantage that both users get the
message even if
no
output was produced. In which case it's probably
better to wrap
dosomething in a shell script:

#!/bin/sh

/usr/local/bin/dosomething 2>&1 > /tmp/dosomething.$$

if [ -s /tmp/dosomething.$$ ]; then
  mailx -s "dosomething output" user1 user2 <
/tmp/dosomething.$$
fi

rm /tmp/dosomething.$$

And run that script as your cron job.

Tim

--- Tru64 User <tru64user@yahoo.com> wrote:
> Greetings,
>
> I have two quick questions.....
>
> 1. (cron Help) I need to send the stdout+stderr of a
> cronjob to an additional email address.
>
> eg. 30 * * * * /usr/local/bin/dosomething
>
> Its stdout + stderr would get mailed to
> owner.....Looking for a way make
> it send to an additional user (I tried some funny
> ways, which i knew wouldn't work)
>
> eg. 30 * * * * (/usr/local/bin/dosomething) >> -
> 2>&1
> |mail some@user < -
>
> Any clues? Both, job owner and additional address
> must
> be emailed .
>
> 2. (MX Question) I am in a Campus environment, and
> just finished setting up sendmail-8.14.5 for one
> additional Tru64 v4.0G (Used same sendmail.mc
> file like other 4 machines I have)
>
> It sends email out fine, but incoming is the
> problem.
>
> I ran #nslookup
>
> > set q=mx (then)
>
> >this_system.com (and results show a wrong MX
> record)
>
> Server: xxx.xxx.xxx.xx
>
> Address: xxx.xxx.xxx.xx#53
>
> this_system.com mail exchanger = 0
> other_system.com
>
> It is supposed to point to its self. On what side
> are
> the corrections supposed to be made? (DNS servers
> managed by another group. I dont run it on local
> system. And how did the other_system.com entry get
> there in the first place....so config problems there
> or here locally? I am convinced it is no wrongdoing
> on
> my part)Please advise.
>
>
>
> _Thanks
>
> Richard
>
>
> __________________________________________________
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com

=====

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:48:56 EDT