Communications and Wireless
1833775 Members
3558 Online
110063 Solutions
New Discussion

Use of route_gateway in /etc/hosts for SMTP traffic

 
SOLVED
Go to solution
Mark Daintree
Occasional Advisor

Use of route_gateway in /etc/hosts for SMTP traffic

I have what I hope is a simple question. I have a server running HP-UX 11 which hosts an application that sends out mail using SMTP. We use dns and have not configured sendmail.cf for traffic.

All mail is routed using the default route_gateway value in /etc/hosts (I believe). This works fine but I have been asked to redirect the mails to a new smtp server.

I would like to know what I need to do. Do I need to just add the new smtp server into the /etc/hosts and remove route_gateway or is it a config on my route_gateway router.

Thanks in advance
4 REPLIES 4
Joaquin Gil de Vergara
Respected Contributor
Solution

Re: Use of route_gateway in /etc/hosts for SMTP traffic

is very easy

add the name to the /etc/hosts file

now you must edit the /etc/mail/sendmail.cf file

edit this fields

Dj$w.domain.com
(Here your domain.com)

and

DS new_smtp_Server

here you specify a samrt relay... that is, sendmail pass all outgoing mail to it and this sends the mail. the same for incoming mail to myhost.domain.com


Good Luck.


P.D.: Post this kind of questions sin the HP-UX forum.... there are a lot of people that can reply you very fast and accurate... ;-?-)
you must now restart sendmail daemon

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
Teach is the best way to learn
Joaquin Gil de Vergara
Respected Contributor

Re: Use of route_gateway in /etc/hosts for SMTP traffic

sorry

remeber restart sendmail!

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
Teach is the best way to learn
Mark Daintree
Occasional Advisor

Re: Use of route_gateway in /etc/hosts for SMTP traffic

Thanks. I have tried but no luck. This is what I have done.

Appended /etc/hosts
ip.ip.ip.ip smtp_server

Ammended sendmail.cf

Dj$w.mydomain

CP.

# "Smart" relay host (may be null)
DSsmtp_server (no gap)


nslookup works and when I send a test message I get the following reponse at the end

354 Send data. End with CRLF.CRLF
>>> .
250 OK
user.surname@mydomain.com... Sent (OK)
Closing connection to smtp_server



Mark Daintree
Occasional Advisor

Re: Use of route_gateway in /etc/hosts for SMTP traffic

Thanks for the help. Problem solved.