Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Use the version in blue, but remove the NS entries for ns1 and ns2. You can't query those nameservers from your mailserver, so it's pointless. Besides, nameservers should not answer external queries for localhost information.
Make sure your your mailserver has an entry like this in /etc/hosts:
Code:
127.0.0.1 localhost.localdomain localhost
The dns would not work without any ns record in these files and restarting named results in [FAILED]. I inserted the following in named.local:
IN NS localhost.
and inserted the following in localhost.zone
IN NS @
and restarted named successfully. Then I restarted sendmail, checked /var/spool/mqueue and the queued messages were gone. Checked /var/log to make sure the email got sent to yahoo and found this relative notation: Aug 24 13:02:58 ns1 sendmail[18724]: m70C37Cn016777: to=<zzzz.yahoo.com>, delay=04:59:06, xdelay=00:00:08, mailer=esmtp, pri=571113, relay=b.mx.mail.yahoo. [66.196.97.250], dsn=2.0.0, stat=Sent (ok dirdel)
confirming that the mail was sent.
It would seem that localhost.zone and named.local do require a NS record, but only for localhost. Whereas for RH the NS records required were for the nameservers on the network. It goes without saying that /etc/hosts had and has the line:
127.0.0.1 localhost.localdomain localhost
together with the respective lines for the nsi and ns2 nameservers.
Hopefully sendmail will work now without any issues.
I know that I will have to resolve the security issue of not being able to view any .htaccess or .htpasswd files, or any other file starting with "." when using any ftp client, but I will deal with this after I get the rest of the websites uploaded. Unfortunately with FC this will take longer since the version of Perl issues 500 errors if there are any spaces at the end of any line in a Perl script.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Of course every zone needs NS entries. For the localhost and loopback zones they should point to 127.0.0.1, as that is the only source you should ever trust for information about your local addresses. You should never have any nameserver other than 127.0.0.1 listed as an NS RR in a local/loopback zone file.
By the way, it wasn't just an issue with your zone files. Your mailserver is unable to perform DNS queries to your nameservers on the same network, which tends to point to a serious mis-configuration of your network some how. Your mailserver can perform recursive DNS queries to the Internet, so obviously it's some probably specifically between your mailserver and your DNS servers.
Unfortunately outgoing mail still is being queued instead of being sent. I resent some mail which previously did not get sent. Here is the maillog entry:
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
So what did you change since it worked fine for sending to yahoo.com addresses? It doesn't make any sense that it would attempt delivery to yahoo.com, but not hotmail.com, unless you improperly listed hotmail.com as one of your own domains (perhaps in relaydomains?). The fact that it takes a long time for a client to send an e-mail to your server indicates again DNS problems, since Sendmail is probably doing a reverse-DNS lookup on the sending IP and blocking on that returning, which eventually times-out.
Can you send to any other domains? Is hotmail.com the only one you have problems sending to, or can't you send to yahoo.com anymore either?
After browsing the other threads on this forum I shutdown NeworkManager and NetworkManagerDispatcher in the gui and then ran the follwing:
$> chkconfig NetworkManager off
$> chkconfig NetworkManagerDispatcher off
$> service network restart
Since /etc/resolv.conf only had nameserver 127.0.0.1, I editted the following files:
/etc/resolve.conf
/etc/sysconfig/networking/profiles/default/resolv.conf
with the following:
All queued mail was sent. (I will follow up this thread to confirm that sending outgoing mail now works properly tomorrow morning, when I will send several emails to different locations.)
I believe that NetworkManager and NetworkManagerDispatcher were the cause of the problem since they kept re-writing the resolv.conf file. These seem to be 2 processes which are not needed for a webserver and a dns server.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Uhhhhhhhhhhhhh, you had those two nameservers in your resolv.conf earlier and all manual DNS queries to them timed-out. You were able to send mail to yahoo.com with 127.0.0.1 as your only nameserver (unless you left out something earlier), so basically what you're saying is there's no pattern what so ever. Some times it works, some times it doesn't, no one knows why.
Personally, if I had that many problems with a machine and had made that many changes and it still wasn't predictable, I'd rebuild it from scratch and start with a more structured and less ad-hoc approach, but that's just me.
You should really do those network captures I talked about earlier, because that would show you exactly what's going on with your DNS queries. Are they not making it out of your mail server? Are your DNS servers seeing them at all? Are they dropping the queries? Is there a firewall on the DNS servers that's blocking the queries? Who knows...
One thing we can be fairly sure of: You probably haven't see the last of your problems yet.
The problem was that NetworkManagerDispatcher would signal NetworkManager and the network connections would be switched each time a service was restarted which resulted in revolv.conf being re-written to only have nameserver 127.0.0.1. If you would run service network restart then resolv.conf would only have the following entries:
nameserver 207.61.69.66
nameserver 207.61.69.67
In any event after disabling both NetworkManagerDispatcher and NetworkManager and manually setting the entries for all 3 nameservers in resolv.conf everything functioned properly this morning. Sendmail sent out all mail instantly without queuing a single message. Mail was sent to 6 different domains; one such mail was sent to 2 different domains withou any issue.
Thanks again for your help. The issue is resolved.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.