- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Linux Sendmail - Hostname lookup failure
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:24 PM
тАО06-15-2004 11:24 PM
I need to send automatic mail from my linux machine to my smtp domain. I don't have DNS.
My hostname is host
smtp domain is smtp.domain.com
I have made following changes to sendmail.cf
- DSsmtp.domain.com
- D{M}domain.com
- Dj$w.domain.com
have added below in hosts file
x.x.x.x smtp.domain.com
/etc/nsswitch.conf
hosts files
Is that right? What else configuration is required to just send mail to user@domain.com.
When I start sendmail, it takes lot of time. And when I send mail, it says smtp.domain.com: host name lookup failure
Please help. I am lost.
Thanks in Advance,
Kusuma
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:29 PM
тАО06-15-2004 11:29 PM
Re: Linux Sendmail - Hostname lookup failure
This what I use in my sendmail.cf file (NO DNS).
DSwebmail.$m
/etc/hosts
145.x.x.15 webmail webmail.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:42 PM
тАО06-15-2004 11:42 PM
Re: Linux Sendmail - Hostname lookup failure
Did you check the hostname and smtp.domain.com with nslookup for the hostname lookup test. You will face the problem there too.
Change the format on /etc/hosts file as
x.x.x.x host smtp.domain.com
where,
host - your hostname
smtp.domain.com - Alias for sendmail
check the hostname with nslookup command.
Regards,
Muthukumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:43 PM
тАО06-15-2004 11:43 PM
Re: Linux Sendmail - Hostname lookup failure
your hosts file should look like this:
x.x.x.x DOMAIN HOST NAME (manchine name hosting the domain)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:48 PM
тАО06-15-2004 11:48 PM
Re: Linux Sendmail - Hostname lookup failure
Why should i put my hostname as an alias to smtpdomain? smtp.domain.com is the smtp mail server. All I want is i should be able to send mails from linux to the smtp mail server. And i can't do nslookup since i don't have dns server. I am sure it should work without that.
Regards,
Kusuma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2004 05:40 PM
тАО06-16-2004 05:40 PM
SolutionAdd to '/etc/mail/mailertable':
smtp.domain.com esmtp:[ip.add.of.host]
then re-make the mailertable database.
If you have many hosts you want to send to or you want to use a SMART_HOST, then you've got a few things to change.
First, add a 'O ServiceSwitchFile=/etc/mail/service.switch' entry. This is to give sendmail an option other than DNS for host-name lookups.
In '/etc/mail/service.switch', add the entry 'hosts files' (yes, many s's).
Next, change the Resolver options in sendmail.
This is either on the 'OI' line in your cf file, or on the 'O ResolverOptions=' line. Change it to be just '-DNSRCH'.
This is to force it not to use a DNS server.
If you are using MC files (which you should be) to manage your sendmail, we're talking about the following defines:
define(`confBIND_OPTS', `-DNSRC')
define(`confSERVICE_SWITCH_FILE', `/etc/mail/service.switch')
Once like this, your system should be able to relay out like a charmer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2004 07:12 PM
тАО06-16-2004 07:12 PM
Re: Linux Sendmail - Hostname lookup failure
Thanks for all the help. I tried what you said. Now it says user unknown.
Pl. clarify my below doubts:
1. can't i have hostname as shortname with FQDN?
2. Actually, i want to set it up as a smart host. for which, i have done the following :
- /etc/mail/service.switch
added the entry - hosts files
- have added settings for disabling dns lookup as u mentioned in sendmail.mc
- have added DSsmtp.domain.com entry.
3. Is there anything else i hvae missed out? Pl. help. I am trying this for longtime now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2004 09:30 PM
тАО06-16-2004 09:30 PM
Re: Linux Sendmail - Hostname lookup failure
Regards,
Kusuma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2004 10:19 PM
тАО06-16-2004 10:19 PM
Re: Linux Sendmail - Hostname lookup failure
But: what if tomorrow/next year administrator of domain.com will change IPs of his mailservers?
IMHO, installing caching DNS server will provide easier solution for this.
And if you don't want to install chaching DNS [it's just install, you don't need any config!] - you can just put few nameservers addresses in resolv.conf.
Rgds,
Vitaly