tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Cron Help + MX question
@ 2002-10-10 14:13 Tru64 User
  2002-10-10 16:37 ` SUMMARY: " Tru64 User
  0 siblings, 1 reply; 2+ messages in thread
From: Tru64 User @ 2002-10-10 14:13 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* SUMMARY: Cron Help + MX question
  2002-10-10 14:13 Cron Help + MX question Tru64 User
@ 2002-10-10 16:37 ` Tru64 User
  0 siblings, 0 replies; 2+ messages in thread
From: Tru64 User @ 2002-10-10 16:37 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-10 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-10 14:13 Cron Help + MX question Tru64 User
2002-10-10 16:37 ` SUMMARY: " Tru64 User

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox