From: Tru64 User <tru64user@yahoo.com>
Subject: SUMMARY: Cron Help + MX question
Date: Thu, 10 Oct 2002 09:37:48 -0700 (PDT) [thread overview]
Message-ID: <20021010163748.3564.qmail@web40909.mail.yahoo.com> (raw)
In-Reply-To: <20021010141337.40612.qmail@web40906.mail.yahoo.com>
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
prev parent reply other threads:[~2002-10-10 16:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-10 14:13 Cron Help + MX question Tru64 User
2002-10-10 16:37 ` Tru64 User [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox