LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-26-2003, 06:12 PM   #1
capstone737
LQ Newbie
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: Red Hat latest release
Posts: 13

Rep: Reputation: 0
Unhappy Imap very slow under Linux...


I am not sure if this is a Red Hat 7.3/imap daemon issue, but I do not know of any other way of saying it. And I apologise for the length of this explanation.

At work, I am using Red Hat Linux 7.3 as a mail server and Red Hat 8.0 as one of the workstations, and I am finding that the imap response time is woefully slow.

I will click on "Get Mail" on the workstation and at times it will take over a minute to return a response from my mailbox. We have a number of POP3 users too and by comparison, POP3 is very fast. For email clients, I have tried Mozilla Mail, Evolution, Sylpheed and Kmail and it is the same for all of them. Sometimes the mail client actually times out and says that it has lost contact with the mail server, as it has taken so long.

However, it may not be a solely imap problem, as Windows clients like Netscape Mail and Mozilla Mail running imap are quite fast and nearly as fast as POP3 under Linux, so I think that it is operating system-dependent.

I have a duplicate installation at my home and it is the same.

If I run "top" on the mail server, often the imap daemon has been running for a LONG time, even many hours, so perhaps this is a clue. But sometimes when I monitor "top" and the daemon is not running and I click on "Send/Receive" on my Evolution imap installation, the imap daemon does not start and Evolution displays the "Send & Receive Mail" dialog. This can sometimes happen for minutes.

In Evolution, sometimes when I click on "Send/Receive Messages", I get:

Scanning folders in imap server 192.168.0.100 (...)

and

Scanning for changed messages (x% complete)

This message may stay on the screen for several minutes.


Often when I just click on an unread message, Evolution displays:

Retrieving message 11988 (...) and this also could stay there for minutes while it loads the message.

And if I click on another mailbox like Trash or Sent, it displays:

Connecting to imap server 192.168.0.100 (...)

and

Refreshing folder (...)

This too, for several minutes.

Our mail server is hardly a power machine:

Celeron 366 with 64Mb RAM and 5400RPM IDE HD

and I have contemplated upgrading it to someting a bit more powerful, but given that POP3 seems to work fine and Netscape and Mozilla Mail with imap are acceptable I wondered of the necessity of doing this.

Can anyone shed any light on this?

Regards,
Brad
 
Old 04-28-2003, 10:00 AM   #2
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
I have a similar problem with my mail server (sometimes, not always). Are you using Courier IMAP?
 
Old 05-04-2003, 11:17 AM   #3
jgaraas
LQ Newbie
 
Registered: May 2003
Posts: 27

Rep: Reputation: 15
I don't have the answer, but I'm also having a similar issue. Here is some info that may help you out.

I don't think that the hardware on your system is the problem. I currently running this on a P4 2.8Ghz with over 2Gigs of DDR.

I do have to thank you for your posting though, I was thinking that I have a Sendmail issue with my server due to the slow connections for sending. You have expanded my search to pop3 and imap4 client connections.

I'll keep you posted if I find anything new.
 
Old 05-05-2003, 04:44 PM   #4
jgaraas
LQ Newbie
 
Registered: May 2003
Posts: 27

Rep: Reputation: 15
Here is some information that may help you. I pulled it directly off of the UW site.

7.24
Why is there a long delay before I get connected to the IMAP or POP server, no matter what client I use?

There are two common occurances of this problem:
You are running a system (e.g. certain versions of Linux) which by default attempts to connect to an "IDENT" protocol (port 113) server on your client. However, a firewall or NAT box is blocking connections to that port, so the connection attempt times out.
The IDENT protocol is a well-known bad idea that does not deliver any real security but causes incredible problems. The idea is that this will give the server a record of the user name, or at least what some program listening on port 113 says is the user name. So, if somebody coming from port nnnnn on a system does something bad, IDENT may give you the userid of the bad guy.

The problem is, IDENT is only meaningful on a timesharing system which has an administrator who is privileged and users who are not. It is of no value on a personal system which has no separate concept of "system administrator" vs. "unprivileged user".

On either type of system, security-minded people either turn IDENT off or replace it with an IDENT server that lies. Among other things, IDENT gives spammers the ability to harvest email addresses from anyone who connects to a web page.

This problem has been showing up quite frequently on systems which use xinetd instead of inetd. Look for files named /etc/xinetd.conf, /etc/xinetd.d/imapd, /etc/inetd.d/ipop2d, and /etc/xinetd.d/ipop3d. In those files, look for lines containing "USERID", e.g.

log_on_success += USERID

Hunt down such lines, and delete them ruthlessly from all files in which they occur. Don't be shy about it.

The DNS is taking a long time to do a reverse DNS (PTR record) lookup of the IP address of your client. This is a problem in your DNS, which either you or you ISP need to resolve. Ideally, the DNS should return the client's name; but if it can't it should at least return an error quickly.

http://www.washington.edu/imap/IMAP-...ndex.html#7.24
 
Old 05-05-2003, 05:02 PM   #5
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Rep: Reputation: 30
IDENT is probably the problem. However, if you have very large mailboxes, you may want to consider another mailbox file type such as MBX. UW-IMAPd will use UNIX style out of the box. This requires a fresh compile of uw-imapd and is out of the scope of this list but I can go into detail if you want.

I was running a configuration where my clients (Outlook, OE, Mozilla, Evolution) were accessing my imapd server. Their INBOXes would get as large as 2G. This is a nightmare for the daemon to parse if it is UNIX style. MBX is much faster.
 
Old 05-05-2003, 06:03 PM   #6
jgaraas
LQ Newbie
 
Registered: May 2003
Posts: 27

Rep: Reputation: 15
Well I did some looking and experimenting on my system and think that I may have found the culprit.

I first looked into the IDENT and found out that (on my version) on 8.12 of Sendmail comes stock on turning it of. (RH mind you).

I then went into the /etc/hosts file on the server and placed an entry into the file with my PC's private ip and computer name.
Bingo, SMTP authentication ranges between 0-2 sec and sending is ruffly the same.

Anyone know how to set Sendmail to not do DNS lookups on private IP's ??
 
Old 05-06-2003, 09:48 AM   #7
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Rep: Reputation: 30
FEATURE(`accept_unresolvable_domains')dnl
^ ^ ??

This _might_ be what you want.

Also, do you misspell binary (bianary) in your signature on purpose?
 
Old 05-06-2003, 09:55 AM   #8
jgaraas
LQ Newbie
 
Registered: May 2003
Posts: 27

Rep: Reputation: 15
Will this setting create possible security/spam problems if I use it?
 
Old 05-06-2003, 09:56 AM   #9
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Rep: Reputation: 30
Yes, crap, should have said that.....sorry.
 
Old 09-11-2003, 07:40 AM   #10
Shou
LQ Newbie
 
Registered: Sep 2003
Location: Japan
Posts: 2

Rep: Reputation: 0
I also have a problrem of the reverse lookup on clients' ip addresses.

I have my server prevent from doing lookup on clients, and would like to learn how to stop DNS lookup on my server when clients make a connection to the server with pop3.
 
Old 09-11-2003, 11:17 AM   #11
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Rep: Reputation: 30
I would instead learn how to get reverse dns to work on your network.....

If this is not local, we need to know which pop3 server you are using.....
 
Old 11-04-2003, 08:45 AM   #12
nshoboul
Member
 
Registered: Sep 2003
Posts: 30

Rep: Reputation: 15
problem with imap server !!

i'm a newbie and i've some confusion !!
when i'm doing telnet localhost 143 , i'm getting :

Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS STARTTLS AUTH=LOGIN] localhost.localdomain IMAP4rev1 2001.315rh at Tue, 4 Nov 2003 14:39:42 +0200 (CAT)
* BYE Autologout; idle for too long
Connection closed by foreign host.

what does this really mean ?
could anyone explain me ?
thanx in advance
 
Old 11-04-2003, 09:12 AM   #13
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Rep: Reputation: 30
I don't see a problem with this. uw-imap has connection timeouts...or it could be xinetd that has the connection timeout, can't remember....

Also, you may want to consider dovecot:
http://dovecot.procontrol.fi/

uw-imap has a 'not so good' track record and doesn't seem to pan out as well for performance reasons. and dovecot supports maildir.
 
Old 11-05-2003, 03:35 AM   #14
nshoboul
Member
 
Registered: Sep 2003
Posts: 30

Rep: Reputation: 15
as there is no problem now i've just been writing this few lines of code in php :
<?php
$username="user";
$password="password";
$mailserver="localhost:143";
$link=imap_open("\{$mailserver}INBOX",$username,$password);
echo $link ;
?>
i tried to open an imap connection, i'm getting this :
Warning: Couldn't open stream {localhost:143}INBOX in /usr/local/httpd/htdocs/view.php on line 5.

i'm really confused!!
could anyone help ?

thanx 4 your help
 
  


Reply


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
qmail-ldap + courier-imap woes (imap capability) syahid Linux - General 1 10-12-2005 01:03 AM
IMAP / Linux issue ajaye1971 Linux - Networking 2 09-07-2005 05:36 PM
IMAP and Cyrus-IMAP on Slackware 10 cyberjames Slackware 2 01-10-2005 02:07 AM
IMAP works but IMAP TLS doesn't under PHP (Horde IMP) theparadigm Linux - Software 0 11-17-2003 01:35 AM
UW IMAP problem downloading IMAP folders nuzzy Linux - Software 1 04-17-2003 05:25 AM


All times are GMT -5. The time now is 04:24 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration