- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: sendmail relay and DNS query
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
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
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
тАО05-27-2003 08:51 AM
тАО05-27-2003 08:51 AM
sendmail relay and DNS query
I want to configure sendmail to relay
all non-local mail to an MS-Exchange server
The exchange mail server is set up in /etc/hosts
I have added the mail server hostname to sendmail.cf
DSmymailserver.mydomain.com
I do not have DNS set up on this machine i.e. I can't do an nslookup on yahoo.com or anything like that.
The hosts line of /etc/nsswitch.conf looks like this :
hosts: files [NOTFOUND=continue TRYAGAIN=continue] dns
Whenever I try to send mail to a non-local address I get a "Name Server Timeout Error"
When I remove dns from nsswitch.conf it works fine.
This is what I do not understand.
Why does it bother trying DNS when I have a relay server configured ?
When DNS lookup fails why does it not then go to the relay server ?
I know that having dns in the nsswitch.conf file is a bit redundant but I would have though that it did not matter as I was routing all non-local mail to MS Exhange.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 09:08 AM
тАО05-27-2003 09:08 AM
Re: sendmail relay and DNS query
1) determine mail routing
2) deal with security/anti-spam measures
What's in resolv.conf?
What do the source and destination e-mail addresses look like (are they qualified or un-qualified; local, non-local, both)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 09:08 AM
тАО05-27-2003 09:08 AM
Re: sendmail relay and DNS query
In /etc/mail/sendmail.cf
At the DS directive
DS
[IP_addr_of_Exchange_server]
save it
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
The IP of the HP box must be explicitly set up in the Exchange server to allow relay. By default, Exchange WILL NOT allow it.
Diagnostic.
sendmail -v -d8.99 -d38.99 mail@yourdomain.net
type a message
.
This will give you good diagnostics so you can tell whether its a network problem or Exchange is rejecting the mail.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 09:10 AM
тАО05-27-2003 09:10 AM
Re: sendmail relay and DNS query
Your nsswitch.conf is not redundant, it's broken. You're telling all deamons on the system that dns is available as a fallback for name service. Since this is not true, any service that wants to look up a host IP not in your /etc/hosts file will try DNS-based look-ups, and eventually time out.
Change your hosts line to read
hosts: files
and you should have fewer problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 09:14 AM
тАО05-27-2003 09:14 AM
Re: sendmail relay and DNS query
To keep environments from needing regular modifications of the /etc/hosts file, many organizations are going to a DNS first setup in name resolution. It allows you to change network configuration at a more central point.
sendmail can either use DNS to resolve mail destination or relay to an explicit IP address. It can probably do a lot of other things, but those are the two I know.
If the exhcange server is handling outbound mail, my previous post will finish it for you. If this HP box needs to route mail to the public Internet, then you need to have working DNS entries in /etc/resolv.conf
I would use the same DNS servers as the outbound Microsoft Exchange box uses if available.
I think the DS directive will solve your current issue, though it would be nice if DNS worked too.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 09:14 AM
тАО05-27-2003 09:14 AM
Re: sendmail relay and DNS query
# #
# This macro is optional. If you wish to send all non-local mail #
# to a smart relay via SMTP just set macro S (DS) to the name of the #
# smart relay. If this macro is not set, then all mail addresses to #
# a non-local user will be send to the relay. #
DSyourexchangeservername
You may also want to set the DM macro in your sendmail.cf:
DMyourdomain.com
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 09:18 AM
тАО05-27-2003 09:18 AM
Re: sendmail relay and DNS query
I am not by any means a sendmail guru, but I did have to set it up to relay to an MS-Exchange server a couple of months ago. When I read your post I went back and looked at my sendmail.cf file because I know I had some issues with my setup also. I noticed above the DS portion in the sendmail.cf file that I had this info in there also:
#My official domain
Dj$w.yourdomain.com
Also, in my sendmail.cw I have the following appended to the end of the file
hostname
hostname.yourdomain.com
I don't know if this will help you, but it probably would not hurt.
Oh, and as for my nsswitch.conf file, this is what my hosts line looks like:
hosts: files [NOTFOUND=continue] dns
One last thing, make sure that you have an entry in your /etc/hosts file for your MS Exchange server.
I will look back in my notes and see if I can find anymore info that might help you.
Hope this helps!
-Bryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 09:18 AM
тАО05-27-2003 09:18 AM
Re: sendmail relay and DNS query
I am not by any means a sendmail guru, but I did have to set it up to relay to an MS-Exchange server a couple of months ago. When I read your post I went back and looked at my sendmail.cf file because I know I had some issues with my setup also. I noticed above the DS portion in the sendmail.cf file that I had this info in there also:
#My official domain
Dj$w.yourdomain.com
Also, in my sendmail.cw I have the following appended to the end of the file
hostname
hostname.yourdomain.com
I don't know if this will help you, but it probably would not hurt.
Oh, and as for my nsswitch.conf file, this is what my hosts line looks like:
hosts: files [NOTFOUND=continue] dns
One last thing, make sure that you have an entry in your /etc/hosts file for your MS Exchange server.
I will look back in my notes and see if I can find anymore info that might help you.
Hope this helps!
-Bryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 09:18 AM
тАО05-27-2003 09:18 AM
Re: sendmail relay and DNS query
I am not by any means a sendmail guru, but I did have to set it up to relay to an MS-Exchange server a couple of months ago. When I read your post I went back and looked at my sendmail.cf file because I know I had some issues with my setup also. I noticed above the DS portion in the sendmail.cf file that I had this info in there also:
#My official domain
Dj$w.yourdomain.com
Also, in my sendmail.cw I have the following appended to the end of the file
hostname
hostname.yourdomain.com
I don't know if this will help you, but it probably would not hurt.
Oh, and as for my nsswitch.conf file, this is what my hosts line looks like:
hosts: files [NOTFOUND=continue] dns
One last thing, make sure that you have an entry in your /etc/hosts file for your MS Exchange server.
I will look back in my notes and see if I can find anymore info that might help you.
Hope this helps!
-Bryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 09:18 AM
тАО05-27-2003 09:18 AM
Re: sendmail relay and DNS query
I am not by any means a sendmail guru, but I did have to set it up to relay to an MS-Exchange server a couple of months ago. When I read your post I went back and looked at my sendmail.cf file because I know I had some issues with my setup also. I noticed above the DS portion in the sendmail.cf file that I had this info in there also:
#My official domain
Dj$w.yourdomain.com
Also, in my sendmail.cw I have the following appended to the end of the file
hostname
hostname.yourdomain.com
I don't know if this will help you, but it probably would not hurt.
Oh, and as for my nsswitch.conf file, this is what my hosts line looks like:
hosts: files [NOTFOUND=continue] dns
One last thing, make sure that you have an entry in your /etc/hosts file for your MS Exchange server.
I will look back in my notes and see if I can find anymore info that might help you.
Hope this helps!
-Bryan