On Tue, Mar 9, 2010 at 9:15 AM, Bill Turner <lotsacaffe...@gmail.com> wrote:
> I have about 120 CentOS 4 servers scattered all over the country.  They are
> setup in master/slave pairs running mySQL with replication.  I want the
> master to send me an email message when an error occurs.
>
> Something like this…
>
> sendmail –s “Company X STATUS” “b...@uponthebox.com” < /tmp/status.txt
>
> Most of my servers have static IPs…not that this should matter.
>
> The last attempt I made at getting this to work was trying to setup sendmail
> to use a remote smtp server (i.e. smptout.secureserver.net).  This is what
> /var/log/maillog reports after I send a message.
>
> Mar  8 11:57:43 localhost sendmail[4640]: o28GSWVf003070:
> to=<b...@uponthebox.com>, ctladdr=<r...@localhost.localdomain> (0/0),
> delay=01:29:10, xdelay=00:00:00, mailer=relay, pri=485003,
> relay=smtpout.secureserver.net, dsn=4.0.0, stat=Deferred: Name server:
> smtpout.secureserver.net: host name lookup failure
>
> Yes, I can ping the smtp server all day long and DNS resolves it.
>
> Isn’t there an easy way to send an email from a stupid command line script
> that doesn’t involve all this sendmail configuration stuff?
>
>
>
> Bill Turner
>
> --
> You received this message because you are subscribed to the Google Groups
> "NLUG" group.
> To post to this group, send email to nlug-talk@googlegroups.com
> To unsubscribe from this group, send email to
> nlug-talk+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nlug-talk?hl=en
>

It's been a while since I've messed with this, but I'm pretty sure you
don't need to find an outside smtp server.  Sendmail handles this for
you.  As long as your sending server can get out on port 25 it will
look up the correct server to pass the message off to without needing
a middleman.

I've set this up with formmail scripts in php and cgi and unless your
server is on a restricted network or has a strange setup, you should
be ok.

If you're hosing with godaddy, they may have to make changes to allow
you to send mail.  If you have shell access there, try to connect to
someone's smtp server:

donaldd...@donalddelp-cti:~$ telnet gmail-smtp-in.l.google.com. 25
Trying 209.85.211.76...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP 8si13013546ywh.11

If this works, you don't need to specify an smtp server for sendmail.
(Someone please correct me if I'm wrong)

-- 
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To post to this group, send email to nlug-talk@googlegroups.com
To unsubscribe from this group, send email to 
nlug-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nlug-talk?hl=en

Reply via email to