System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring sendmail without DNS : currently not working without DNS

prasadb
Super Advisor

Configuring sendmail without DNS : currently not working without DNS


Dear all,

i want to start the mailing serive on one my redhat linux server.I dont want to use DNS server for the mail routing. i want to do it using host file
for that the procedure followed by me was :

1. i downloaded sendmail rpm and installed.
2. added my domain name in /etc/mail/virtusertable
3. mail host is present in /etc/hosts
4. the entries

FEATURE(`accept_unresolvable_domains')dnl
FEATURE(`accept_unqualified_senders')dnl


are there in /etc/mail/sendmail.mc file


and when i use sendmail command,

#echo "test" | sendmail -v datacentre.dl@idea.adityabirla.com


it gives the error :

datacentre.dl@idea.adityabirla.com... Transient parse error -- message queued for future delivery
datacentre.dl@idea.adityabirla.com... queued

and when i used

#mailx -s "test" datacentre.dl@idea.adityabirla.com < /etc/hosts

it doesn't give any o/p ..

Howver i tried it by adding DNS in /etc/nsswitch.conf , it works. but kindly suggest me how to do it withoud DNS..

Thank you in advance..


WR,
prasad
5 REPLIES
Jeeshan
Honored Contributor

Re: Configuring sendmail without DNS : currently not working without DNS

Steven E. Protter
Exalted Contributor

Re: Configuring sendmail without DNS : currently not working without DNS

Shalom,

You normally need DNS to deliver mail directly.

The way around it is the DS directive in sendmail.cf or the smart host directive in sendmail.mc followed by compilation of sendmail.cf file

This sets up smtp relay.

What you need is an smtp relay server. Most firewalls and exchange servers have the feature, but it must be set up explicitly to permit mail from the originating host.

Best is by IP address.

There is more in depth knowledge on this topic from http://www.sendmail.org

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
prasadb
Super Advisor

Re: Configuring sendmail without DNS : currently not working without DNS


hello all,

Thanks for you replies.

>check this link http://www.phase2.net/2007/03/20/sendmail-on-rhel-40-without-dns/
i can't as it is blocked by websense being uner networking category.

>You normally need DNS to deliver mail directly.
well, its running now. But how i am unable to understand..

1.i removed dns entry from the /etc/nsswitch.conf file like,

hosts: files

2. But when i removed resolv.conf, mail doen't work and gives the above mentioned error.

datacentre.dl@idea.adityabirla.com... Transient parse error -- message queued for future delivery
datacentre.dl@idea.adityabirla.com... queued

3.when created resov.conf file having DNS servers entry it resumes again.

My understanding is that if nsswich.conf has no preference for DNS at all, then it should not require resolv.conf file. kindly correct me whenever you find me wrong..

please help !!!


Steven E. Protter
Exalted Contributor

Re: Configuring sendmail without DNS : currently not working without DNS

Shalom,

You need resolv.conf. No way around that.

The network block is perfectly normal.

You need to make arrangements with an smtp relay server to have the mail delivered.

If this is an isp environment they always provide such a server.

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
prasadb
Super Advisor

Re: Configuring sendmail without DNS : currently not working without DNS

Hi steve,

>You need resolv.conf. No way around that.

this is what i was not confirmed about. as per understanding in HP-UX we don't need resolv.conf when we have no DNS server configured, and i was relating this one to HP only.

kindly confirm this.

10 points for you last answer :-)

WR,
prasad