Operating System - HP-UX
1833748 Members
2885 Online
110063 Solutions
New Discussion

Re: Help ??? scripts, SMTP & email

 
Tee How Long
Advisor

Help ??? scripts, SMTP & email

Hi,

Let me try to describe my scenario here.

I have a HPUX server that I would like to develop some monitroing script that allow to send the alert to me via email notification. And, the email is sent via another SMTP server that is managed by another email admin.

Basically, I have done this setup in another OS platforms like Solaris and Tru64. And it's simply easy, I just added mailhost entry in /etc/hosts. And I have done it HPUX, and it just doesn't work. Any suggestion?
10 REPLIES 10
A. Clay Stephenson
Acclaimed Contributor

Re: Help ??? scripts, SMTP & email

All you have to do is edit the /etc/sendmail.cf file and define the "Smart Relay" (the DS macro). Look in the sendmail.cf file and you should see some comments about "Smart".

essentially, all you need to do is
DSotherhost

If it ain't broke, I can fix that.
Tee How Long
Advisor

Re: Help ??? scripts, SMTP & email

Have added the entry in /etc/mail/sendmail.cf. It's still not working.
A. Clay Stephenson
Acclaimed Contributor

Re: Help ??? scripts, SMTP & email

Have you stopped and restarted the sendmail daemon? Can the hostname you added as the smart relay be resolved?
If it ain't broke, I can fix that.
Tee How Long
Advisor

Re: Help ??? scripts, SMTP & email

Yeap, have started the sendmail. I have tried using both hostname/ip in sendmail.cf.

# mailq
/var/spool/mqueue (1 request)
----Q-ID---- --Size-- -----Q-Time----- ------------Sender/Recipient------------
j6D1ElT25137 29 Wed Jul 13 09:14 hltee
(host map: lookup (domain.com.my): deferred)
hltee@domain.com.my
Rajeev  Shukla
Honored Contributor

Re: Help ??? scripts, SMTP & email

Looking at the your mailq output
(host map: lookup (domain.com.my): deferred)
hltee@domain.com.my
The deferred connection could have 2 meanings. Either the destination domain is not available, not resolveable by this host sending mails. Or it could mean that the destination host which you are using to relay mails wont accept connections from this host.
Now the best thing would be to do a telnet to the relay host from this server on port 25 and compose a mail at command promt and send to this address to see if that works.

Cheers
Rajeev
Tee How Long
Advisor

Re: Help ??? scripts, SMTP & email

I think the SMTP server is running fine, I am having couples of non HPUX servers that is delaying mail via that SMTP servers, and it's running ok.

In both Solaris and Tru64, the setting is way too easy to configure.
Rajeev  Shukla
Honored Contributor

Re: Help ??? scripts, SMTP & email

Other thing Tee, as you said you tried adding IP/Hostname in sendmail.cf config for smart relay i.e DS
The IP will not work, you need to put only the fully qualified host name i.e DSrelayhosy.mydomain.my
and also verify that you can resolve the hostname from command prompt using nslookup. Since your log which i had a look agains says about host lookup failed

Joseph Loo
Honored Contributor

Re: Help ??? scripts, SMTP & email

hi,

try this:

# telnet 25
to check if SMTP service is running on that SMTP server and also if there is any firewall blocking.



regards.
what you do not see does not mean you should not believe
Mel Burslan
Honored Contributor

Re: Help ??? scripts, SMTP & email

Tee,

Did you try the suggestion of telnet to port 25 of the mail relay server and see if you can get connected ?

telnet smart_relay_server 25

are you getting a connection or are you getting bounced ?

I am pretty sure your smart relay server is an exchange server. Are you sure the mail admins are allowing your hpux servers relaying mail thru them ? Usually to minimize spam relaying, every sender using the mail relays needs to be blessed by the mail administrators. You had better speak to those people first to make sure being allowed.
________________________________
UNIX because I majored in cryptology...
Tee How Long
Advisor

Re: Help ??? scripts, SMTP & email

Yes, telnet delay_host 25 is ok.