1826451 Members
4125 Online
109692 Solutions
New Discussion

Re: Sendmail problem!

 
SOLVED
Go to solution
Fragon
Trusted Contributor

Sendmail problem!

Sendmail 8.9.3 running on HP-UX11.00. Network config are as follows:
Hostname: hosta
IP address: 192.168.0.1
Mask: 255.255.255.0
Default Gateway: 192.168.0.2
This server can't send mails directly to Internet. But it can connect to hostb.

Another SMTP server's IP address is 192.168.100.1 (hostb,255.255.255.0). This server can send all mails to Internet. And it allows smtp relay from hosta.

I want to send emails from hosta through hostb to Internet. How to config my sendmail.cf file?

Another other attentions must I pay?

TKS a lot.
11 REPLIES 11
benoit Bruckert
Honored Contributor
Solution

Re: Sendmail problem!

Hi,
You just have to specify the DS macro :
edit sendmail.cf,
add :
# "Smart" relay host (may be null)
DShostb.domain.com

restart sendmail,
it should work...
Une application mal pansée aboutit à une usine à gaze (GHG)
jean-yves poch
Advisor

Re: Sendmail problem!



Hi,

> I want to send emails from hosta through
> hostb to Internet. How to config my
> sendmail.cf file?

well preferably :-)

1) if you use DNS
hostb must be MX in DNS.

2) if you don't use DNS
add hostb in /etc/hosts and alias mailhost in the same line :
192.168.100.1 hostb mailhost

add :
DRhostb
DShostb
in sendmail.cf

restart sendmail daemon.

try the config with :
mailx -v email

see http://www.sendmail.org

Beacreful, the ways of the sendmail are impenetrable :-)

Good Luck

Jean-Yves

pitstop
T G Manikandan
Honored Contributor

Re: Sendmail problem!

In your sendmail.cf file

Dj$w.
DS

Restart your sendmail
/sbin/init.d/sendmail stop & start.

The important thing is that
you should be able to do a nslookup of hostb from hosta.
That should be the important thing.

Thanks
Mercadie
Advisor

Re: Sendmail problem!

Hi,

in the hosta sendmail.cf set :
DShostb

If you use DNS name resolution on hosta you may also need to modify the following lines in sendmail.cf to avoid internet name resolution from hosta:

comment out the line:
# pass to name server to make hostname canonical
R$* $| $* < @ $* > $* $: $2 < @ $[ $3 $] > $4

and change each of the mailers to have the 0 flag like:,
Msmtp,P=[IPC],F=0mDFMuX, S=EnvFromSMTP/HdrFromSMTP .....

I had this problem a couple of weeks ago, now it works fine !!

Emmanuel
Emmanuel Mercadie
MANOJ SRIVASTAVA
Honored Contributor

Re: Sendmail problem!

I think if u vi /etc/sendamil.cf you can see where to specify the smtps server . Also u need to stop and retart the senamil daemon .


Make sure on host A if u do a ping smtp server or the IP adres you should be able to go through . incase that is not happening then u have to add entry in /etc/hosts file so that it works .


Manoj Srivastava
Fragon
Trusted Contributor

Re: Sendmail problem!

I have configued all files concerned, but when I send the mail to the Internet in hosta, there is errors.
#sendmail -v hpux@hp.com
hp.com: Name server timeout.
...
Why?
harry d brown jr
Honored Contributor

Re: Sendmail problem!


do this as a test:

nslookup hp.com


live free or die
harry
Live Free or Die
harry d brown jr
Honored Contributor

Re: Sendmail problem!

And just as a last comment, sending emails on the internet are still free.

live free or die
harry
Live Free or Die
T G Manikandan
Honored Contributor

Re: Sendmail problem!

It is trying to resolve the external hostname to which you are sending mail addresses.make sure u have hp.com entry in your DNS.

nslookup hp.com


should resolve


Revert

jean-yves poch
Advisor

Re: Sendmail problem!



Hi,

Check :

1) the /etc/resolv.conf file
+
nslookup www.hp.com
ping www.hp.com
traceroute www.hp.com

Who is the DNS servers ?

The MX is OK ?

2) /etc/nsswitch.conf
check 'dns' in line host

3) Firewall ?
the firewall must be authorize the port 53/udp
and 53/tcp and port 25 (smtp)
53 = port DNS in /etc/services
udp = client/server communication
tcp = primary/secondary communication

4) Is what you use a proxy (WEB, DNS) on your DMZ?

5) If the DNS is OK

try :
mailx -v hosta
....
.
mailx -v hostb
....
.

pitstop
benoit Bruckert
Honored Contributor

Re: Sendmail problem!

DS works also,
Your timeout DNS means that you resolv.conf isn't properly configured. In the host file,
add hostb fully, I mean with the domain extension !!
192.168.100.1 hostb.domain.com

hope that help
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)