1820645 Members
2009 Online
109626 Solutions
New Discussion юеВ

Sendmail problems

 
Shannon_1
Occasional Advisor

Sendmail problems

Have HP-UX 11.11 and trouble using sendmail.
I think it is having trouble resolving the domain name but I'm not sure. I can send mail to users on the server but not outside the server even to a server on the same network. I get a host name not found error and also a 5.2.1 status error. Do I have to specify in the resolv.conf file every domain that I wish to send email to? Please advise.
5 REPLIES 5
Rick Garland
Honored Contributor

Re: Sendmail problems

The resolv.conf should point to your DNS server. The DNS server would be able to resolve the host names.

If you are not resolving other systems, especially those on same network, are you pointing to a DNS server?

What does your /etc/nsswitch.conf file look like? Are you searching files first and then DNS? This order (DNS/files vs files/DNS) is critical to tell the system where to begin its lookups.

Steven E. Protter
Exalted Contributor

Re: Sendmail problems

dig hp.com

If that does not provide you an answer, you either have bad setup in /etc/nsswitch.conf or servers that can't be reached in /etc/resolv.conf or both

The most common problem with mail sending is not being able to resolve a hostname.

There is a way around that though, the DS directive in sendmail.cf

sendmail.cf configuration file has a DS directive that allows relay of all mail regardless of hostname resolution.

DSexchangeserver.your.net

or

DS
192.168.0.50

Can set up relay.

Then:

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Then things should work.

Diagnostics from the server:

sendmail -v -q

process the mail queue verbose mode.

sendmail -v -d8.99 -d38.99 someone@my.net

type some text

.


This will get you quite a bit of information to proceed with.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Shannon_1
Occasional Advisor

Re: Sendmail problems

This is contents of nsswitch.conf.
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: files
group: files
hosts: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
passwd: files
group: files
hosts: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
~
~
~
Rick Garland
Honored Contributor

Re: Sendmail problems

It appears that the nsswitch.conf file is looking at the files only. No DNS resolution is taking place.

Try changing the nsswitch.conf file to have the hosts lookup to DNS then to files.

Example;
hosts dns files

This will tell the system to look at DNS first. The /etc/resolv.conf should look to your DNS server as well.


Bejoy C Alias
Respected Contributor

Re: Sendmail problems

Do u have a DNS server configured in ur network . If yes set those ips in /etc/resolv.conf .If not and u want to send mails only in ur internal network then add all those domains to which u want to send mails in /etc/hosts file . Try nslookuping the host name to which u r not able to send mails . 'nslookup hostname'.
Be Always Joy ......