> [EMAIL PROTECTED] wrote:
>> Message: 2
>> Date: Mon, 8 May 2006 16:30:44 +0300 (EEST)
>> Subject: Re: [SM-USERS] Possible DNS problem being shown by Squirrelmail
>> From: "Tomas Kuliavas" <[EMAIL PROTECTED]>
>> To: [email protected]
>>
>>
>>> I've recently installed Squirrelmail on two virtualised (running Plesk
>>> &
>>> Virtuozzo) supposedly identical web servers running FC3. My problem is
>>> that on one server there was a delay of 5-10 seconds in displaying any
>>> pane in Squirrelmail. This same server was initially unable to resolve
>>> any external addresses and was fixed by Tech Support adding another
>>> name
>>> server to /etc/resolv.conf . Then it was slow to resolve external
>>> addresses (the same 5-10 seconds) upon doing something like "wget
>>> http://www.google.com";, I fixed this myself by changing the DNS servers
>>> in /etc/resolve.cfg to be the same ones as on the trouble-free server.
>>> However Squirrelmail was still exhibiting the 5-10 second delay when
>>> opening panes. By changing the IMAP server that SM uses from
>>> "mail.babbnet.com" to "localhost" I was able to remove this delay.
>>> However I'm conscious the underlying problem is still there and I would
>>> like to work out what is going on. I would like to be able to do
>>> something on the command line to illustrate the problem to Tech Support
>>> (I can't just tell them SM is slow as SM is installed by myself and as
>>> such isn't supported by them) and would ideally like to be able to fix
>>> it myself without waiting for them!
>>>
>>> Can anyone see why "mail.babbnet.com" vs. "localhost" would cause this
>>> delay?
>>>
>>
>>
>> a) localhost is resolved in /etc/hosts, mail.babbnet.com is resolved in
>> dns.
>>
>> b) connection to mail.babbnet.com goes through different interface and
>> some traffic (maybe tcp/113) is dropped by firewall rules.
>>
>> if you are unprivileged user on server and can change globally used dns
>> server's without any help from tech support - change your provider.
>> /etc/resolv.conf is not supposed to be world writable.
>>
>>
> Hi,
> I have root access to these servers so there's no problem there! I'm
> just trying to work out what I can do to illustrate this problem to tech
> support, it's no use telling them how the problem manifests itself in
> Squirrel Mail as they don't support this seeing as I've installed it
> myself.
>
> How could I replicate the slow resolution of mail.babbnet.com on the
> command line?

----
<?php
function microtime_float() {
   list($usec, $sec) = explode(" ", microtime());
   return ((float)$usec + (float)$sec);
}

$start = microtime_float();

$stream = fsockopen('localhost', 143,$errorNumber, $errorString);
if(!$stream) {
    die('connection failed');
}
$imapline = fgets($stream, 1024);
fputs($stream, "A001 LOGOUT\r\n");
fclose($stream);

$end = microtime_float();

echo $end - $start;
?>
----

replace 'localhost' with 'mail.babbnet.com' or ip address and time code
execution ('time php test.php'). 143 is port number. If you use TLS,
prefix host name with 'tls://' and change port number.

-- 
Tomas


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
squirrelmail-users mailing list
Posting Guidelines: 
http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: [email protected]
List Archives: 
http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to