LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-24-2008, 12:28 PM   #16
helshylock
LQ Newbie
 
Registered: Mar 2004
Posts: 15

Original Poster
Rep: Reputation: 0

Quote:
Originally Posted by chort View Post
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.

Thanks again.
 
Old 08-24-2008, 01:41 PM   #17
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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.
 
Old 08-24-2008, 07:00 PM   #18
helshylock
LQ Newbie
 
Registered: Mar 2004
Posts: 15

Original Poster
Rep: Reputation: 0
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:

Aug 24 19:18:25 ns1 sendmail[20598]: m70NHjht020598: from:<zzzz@tesbroadcasting.net>, size 3960, class-0, nrcpts=1, msgid=<017801c9063f$e7cabe60$44453dcf@tesbroadcasting>, proto=SMTP, daemon=MTA, relay=[207.61.69.68]
Aug 24 19:18:25 ns1 sendmail[20598]: m70NHjht020598: to:<zzzz@hotmail.com>, delay=00:00:00, mailer=esmtp. pri=33960, dsn=4.4.3, stat=queued


For some reason Sendmail is not looking up the mail server for hotmail.com (in this case) to relay the mail. How could this be corrected?

It is my understanding that Sendmail has now changed. I am wondering if this problem is caused by /etc/mail/access having these entries:

Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
Connect:207.61.69.68 RELAY
Connect:tesbroadcasting.net RELAY


It also seems to take a long time for outgoing mail to leave the Outbox and then it gets only queued.

Thanks
 
Old 08-24-2008, 09:04 PM   #19
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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?
 
Old 08-24-2008, 09:05 PM   #20
helshylock
LQ Newbie
 
Registered: Mar 2004
Posts: 15

Original Poster
Rep: Reputation: 0
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:

nameserver 127.0.0.1
nameserver 207.61.69.66
nameserver 207.61.69.67

Then ran the following:

$> service sendmail restart

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.
 
Old 08-24-2008, 09:28 PM   #21
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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.
 
Old 08-25-2008, 07:52 AM   #22
helshylock
LQ Newbie
 
Registered: Mar 2004
Posts: 15

Original Poster
Rep: Reputation: 0
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.
 
  


Reply



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 Outgoing Mail Problem quadirkareem Linux - Networking 3 04-10-2008 02:45 AM
sendmail and outgoing mail shafey Linux - Networking 1 11-16-2005 04:57 AM
Problem w/ outgoing mail using Sendmail virtual hosting dairyland Linux - Software 0 03-30-2005 08:33 AM
How to separate Incoming Mail and Outgoing Mail on SENDMAIL LiloAma Linux - Networking 1 03-22-2004 02:24 AM
sendmail outgoing mail karunesh Linux - General 0 11-17-2003 02:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

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