1832086 Members
3246 Online
110037 Solutions
New Discussion

Re: sendmail without DNS

 
Rusty Sapper
Frequent Advisor

sendmail without DNS

I need to use sendmail on a server that does not use DNS.
I have set the DS parm to point to a smart relay and I have changed the service.switch file to use files.

is there anything else I need to do?

when I try and send mail, I get the following error.

user@foo.com... foo.com: Name server timeout
user@foo.com... Transient parse error -- message queued for future delive
ry
user@foo.com... queued
8 REPLIES 8
Paula J Frazer-Campbell
Honored Contributor

Re: sendmail without DNS

Hi

This should help.

http://www.sendmail.org

Paula
If you can spell SysAdmin then you is one - anon
Sanjay_6
Honored Contributor

Re: sendmail without DNS

Hi Rusty,

Put the smart relay host server name and ip address in your /etc/hosts file. also make sure the relay host is able to resolve your system name and ip address and will accept the mails from your server. You should be able to do a nslookup for your relay host on local system and on vice versa on the relay server.

Hope this helps.

Regds
Rusty Sapper
Frequent Advisor

Re: sendmail without DNS

Nope, not really.
Rusty Sapper
Frequent Advisor

Re: sendmail without DNS

Sanjay,
The Host file is already set with the ip address of the relay with the alias that I used in the sendmail.cf file.
The logs on my relay show that no connection is even being attempted. It just seems like sendmail is still trying to use DNS even though I've configured the relay and changed the service.switch file. I can telnet to my relay on Port 25 so there is no networking issues.

any ideas?
Paula J Frazer-Campbell
Honored Contributor

Re: sendmail without DNS

Rusty

What were the results of nslookup?

Paula
If you can spell SysAdmin then you is one - anon
Sanjay_6
Honored Contributor

Re: sendmail without DNS

Hi Rusty,

Edit (if required create) the file /etc/nsswitch.conf or copy the default file /etc/nsswitch.hp_defaults and for all the entries remove the entries for NIS and DNS and leave the files over there. Then give your sendmail a try.

Make sure you have files as the only entry for services and hosts.

If you do a nslookup, it should be looking to resolve the hostname using files (/etc/hosts). Also you should restart whenever you make any change to the sendmail.cf file,

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

Hope this helps.

Regds
Wodisch
Honored Contributor

Re: sendmail without DNS

Hello Rusty,

be aware that sendmail is NOT using the "/etc/nsswitch.conf", but has its own file "/etc/mail/service.switch" for this!

And the simplest "trick" is to add an "alias" for each host into your "/etc/hosts" file, which is just the hostname, but with an additional dot (".") at the end...

10.1.1.1 demo demo. #see?

HTH,
Wodisch
Sanjay_6
Honored Contributor

Re: sendmail without DNS

Hi Wodisch,

thanks for the correction.

Regards
Sanjay