Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-30-2015, 01:37 AM   #1
Registered: Apr 2004
Posts: 52

Rep: Reputation: 1
Sendmail name lookup issue

I am having some strange issues with sendmail at the moment.

When a mail comes into my sendmail server, where it is then relayed onwards, the sendmail server for whatever reason tries to forward it a hostname that it shouldn't.

Have no idea where it gets this hostname from in the first place as it should be sending it to a server.

So my question is, does anyone exactly know how sendmail performs a hostname or DNS lookup and where it's cached. The strange thing is though that a restart of the sendmail service fixes this, yet it reappears sometimes, usually when we have some network issue in the back-end.

One would think that sendmail would clear its cache every few minutes. Or does it leverage something else to perform this lookup.
Old 04-30-2015, 12:18 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,053
Blog Entries: 14

Rep: Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226
Sendmail gets the MX (Mail Exchange) record for the target domain (assuming you don't have a relay host defined). Caching if any is done by the resolver (e.g. Windows DNS or BIND on Linux/UNIX) not by sendmail itself so far as I know.

Typically you have an /etc/nsswitch.conf that says how to lookup names which usually will have something like "host: files dns" in it that means to first search files (/etc/hosts in this case) and if not found look in dns. There are other possible entries such nis+ that could be there.

For DNS you also usually have an /etc/resolv.conf that tells it which DNS servers to query for the answer.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail IP name lookup failed tzh Linux - Server 2 03-26-2012 11:07 AM
Host lookup failure with Sendmail MattiasLofgren Slackware 4 05-14-2009 04:00 PM
sendmail reverse lookup problem stioanid Linux - Software 3 12-17-2008 07:35 AM
problem with sendmail, IP address lookup failed mcd Linux - Networking 6 03-14-2005 09:14 AM
sendmail: host name lookup failure GabeF Linux - Networking 3 12-04-2002 09:00 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration