SquirrelMail  
Donations
News
About
Support
Screen shots
Download
Plugins
Documentation
Sponsors
Bounties













Security Notice
Phishing campain
UPDATE YOUR
EMAIL SECURITY
"IUEU"

This is very similar to the MailServerSMTPProblem, except it deals with your IMAP server.

Potential causes:

  • The server you specified doesn't exist (typo).
  • You don't have an IMAP server running on the server you specified.
  • It is not on the port you specified (it usually runs on port 143).
  • You are denied access to the IMAP server.
  • There is no Maildir directory for that username (will happen with Qmail MTA's).

Telnet to port 143 (or whatever) of the IMAP server and see if you get a response of some sort. You can use "a01 logout" to close the IMAP connection if it exists. If that works, check your configuration again for SquirrelMail and check your configuration for the IMAP server. Maybe the IMAP server's logs will provide some insight?

I had to do a couple things:

  1. Turn on IMAP in xinetd.
  2. Figure out how I can connect to my IMAP server by using "telnet xxxx.example.com 143" or whatever. The notes above are good for testing this. After you figure out how you can connect, you need to rerun the server configuration utility. If you're using Red Hat 8.0, you should set it up like this:
SquirrelMail Configuration : Read: config.php (1.2.0)
---------------------------------------------------------
Server Settings
1.  Domain               : xxx.example.com
2.  IMAP Server          : xxx.example.com
3.  IMAP Port            : 143
4.  Use Sendmail/SMTP    : SMTP
6.    SMTP Server        : xxx.example.com
7.    SMTP Port          : 25
8.    Authenticated SMTP : false
9.    POP Before SMTP    : false
10. Server               : uw
11. Invert Time          : false
12. Delimiter            : detect

Notice how the server is "uw" and NOT "cyrus". Red Hat 8.0 uses UW by default.


The SquirrelMail error "There was an error contacting the mail server." is also displayed even if the IMAP server is running, but is configured to require TLS/SSL authentication. This means that SquirrelMail is required to authenticate with the IMAP server in an encrypted stream as opposed to clear text.

I am presently (March 2003) seeing issues with SquirrelMail 1.2.1.1 and FreeBSD 5.0 (UW IMAPd) out-of-the-box, but I suspect that it is my SquirrelMail configuration that is at fault.


Error connecting to IMAP server: <server_name>.
0:

I was getting this error on OpenBSD. This was happening because (by default) Apache is run chroot'ed so DNS lookups fail. Changing the configuration to use hard-coded IP addresses instead of names for $imapServerAddress resolved this.


I had the same error under Debian, hard-coding the IP addresses solved the problem.


ERROR: 
ERROR : Connection dropped by imap-server. 
Query: LOGIN "username" "password"

I got this error on login and also in the left frame. This is an intermittent error. The username and password are displayed in plain text on the error page, which is a security issue. I believe my web host (Dreamhost) is on version 1.4.1. They have told me this is a SquirrelMail issue.


ERROR : Connection dropped by imap-server

I had this intermittent problem and discovered it was an issue with extremely large attachments in the mail spool. I think the issue is the following: with large mail spools or with large attachments within the mailspools, imapd requires a lot more time to parse through the spool. SquirrelMail times out while waiting for imapd to respond. (the default time-out in SquirrelMail 1.x is 15 seconds).

Possible solutions:

  1. Remove large attachments from the mail spool.
  2. Convert the mail spool to a binary format such as mbx that can be parsed and handled more quickly than a straight text file.
  3. Use a larger timeout while waiting for the IMAP read request to complete. Thick clients such as Outlook have a configurable timeout from 1 minute to 10 minutes... I believe SquirrelMail 2.x has better support for a longer timeout.

If you want to increase the timeout in SquirrelMail 1.x go to line 444 of functions/imap_general.php and change the last parameter of the fsockopen() call from 15 [seconds] to something larger. Keep in mind that if you increase this, you may also need to increase the "max_execution_time" parameter in your php.ini file.


Instead of the previous fix, you should add the following line at line 445 of functions/imap_general.php so that the stream doesn't time out while fgets() is waiting:

stream_set_timeout($imap_stream,600); // wait max 10 minutes for IMAP request to complete

This solved my problem with a 250 MB inbox.

ADDENDUM:

From PHP 4.3.0 & up, it's easier to change default_socket_timeout in php.ini to eg. 600. This way, the SquirrelMail source code can be left untouched.


* ERROR : Unknown imap response.
Query: FETCH 1:* (FLAGS UID RFC822.SIZE BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority Content-Type)])
Server responded: 

Error occurs when "show all" is clicked , also when selected e-mails are opened.

Using SquirrelMail 1.4.3a


May be a problem with Internet connection if your Internet connection / bandwidth low this problem occurs.


Definitely not a problem with bandwidth, as myself and others have experienced it over 1mb-10mb connections. Seems to be quite random.


Make sure that the permission are mysql:mail in /Maildir

chown -R mysql:mail Maildir/

SquirrelMail 1.4.4

ERROR : Connection dropped by imap-server. 

IMAP crashes. Nothing in any of the logs. IMAP cannot be restarted. Machine has to be rebooted. It's crashing about every 3rd day. Bizarre.

Any ideas?


I had the same problem, later found an offending entry in hosts.deny

[surely this was not intermittent then?]


This "connection dropped" error message is obviously a 'nice' translation by SquirrelMail. Could someone tell us the raw error that occurs to cause this kind of failure? Then we can perhaps look at IMAP references to find out what could be happening.


Hosts.deny is clean... Still having a crash every 72 hours or so.

IMAP itself is not crashing. I can still telnet in...it's just

SquirrelMail seems to see the IMAP connection dropped...with nothing logged. ever.


I got the "connection dropped" error message from one user after setting up SquirrelMail. I'm using Courier IMAP. I discovered that he did not have a Courier Maildir in his home directory. I set him up with a default and that solved the problem.

Owen


ERROR : Unknown imap response.
Query: FETCH 1:* (FLAGS UID RFC822.SIZE BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority Content-Type)])
Server responded: 

SquirrelMail 1.4.4 This error happens when "show all" is selected. At the time this happens, the IMAP server is very lightly loaded. At one time we seemed to be able to fix this problem by deleting the user's .pref file; but this doesn't seem to help any more (since we upgraded to 1.4.4?). Once this happens SquirrelMail response to everything slows to a crawl. Anyone have any ideas?

Ron


Fedora Core 4 runs Apache under SELinux settings, so it cannot connect to the mail system (SMTP, IMAP, Sendmail).

Temporarily disable SELinux with this: "setenforce 0" and restart Apache.

You can permanently disable SELinux with the instructions here: http://fedora.redhat.com/docs/selinux-faq-fc3/index.html#id2825880

Disabling SELinux also fixed the problem on my server.

On FC5: run "system-config-securitylevel", in SELinux tab click "Modify SELinux policy", then in "HTTPD Service" check box next to "Allow HTTPD scripts and modules to connect to the network".

On Red Hat Enterprise Linux/CentOS 5: setsebool httpd_can_network_connect on will allow you to connect to the IMAP server, without having to disable SELinux.


I have the same, and it was stupidly easy. I have aliases and the user "kgrzelak" cant see his mail cause it's aliased to the user "grzelak".


Raising the instances in /etc/xinetd.conf on Red Hat based machines seems to help with this. Default is 60, I raised mine to 250.


I am receiving an error message after 2-3 days of uptime when using SquirrelMail (Horde works fine).

I either get: "ERROR: Unknown IMAP response." or "ERROR: Connection dropped by IMAP server."

I saw a post on http://mailman1.u.washington.edu/pipermail/imap-use/2005-December/000056.html

with the same symptoms, and the answer was to fix SquirrelMail, or slow the IMAP server down. The problem goes away when I `strace` the imapd process, which in effect slows down the IMAP server.

Anyone know the proper way to fix this issue?

ERROR: Unknown IMAP response.

Query: FETCH 1:* (FLAGS UID RFC822.SIZE INTERNALDATE BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority Importance Priority Content-Type)])

Server responded:

btw, this is version 1.4.6 with courrier-imap


ERROR : Connection dropped by imap-server

I had this error after log into SquirrelMail. My NEW server was missing the libfam libraries. I have fixed this by running yum install gamin gamin-devel, which solved the problem.

Alaa


ERROR : Connection dropped by imap-server

I had the same error after log into SquirrelMail.

No error was found in log files! Running tcpdump -i lo -n -s 1500 -X tcp port 143 discovered the problem Account's mailbox directory is not owned by the correct uid or gid.

Solution: Edit Courier config file imapd and set IMAP_MAILBOX_SANITY_CHECK=0.

Derk, 2010-12-27


ERROR : Connection dropped by imap-server

I had this error after login into SquirrelMail. I did some investigation and noticed that my Courier IMAP Spawned 2 processes eating up the entire CPU. This was using when Firefox or Internet Explorer. So I thought, let's use Lynx and voilĂ : I could log in and no more spinning processes etc. Now the question is: why? JavaScript perhaps? I will dig further and report my findings here.

The "bug" exists in 1.4.9a and 1.5.1. In 1.5.1 it says:

ERROR: 
Unknown error: 

I am beginning to suspect out friend PHP 5.2.1, but it is weird that it works under Text mode. In any case, questions or solutions: steve ( at) ion (do t) lu

Steve


I never figured this out. I just installed dovecot (instead of courier) instead and it worked perfectly

2009-05-23


I had this issue after recovering some mailboxes on to a new server - it transpired that the problem was permissions related on the user home dirs .. chmod as required and everything worked.

Dan K, 2009-05-23


For one of my mailboxes, I got:

"ERROR: Connection dropped by IMAP server. Query: FETCH 1:* (FLAGS UID RFC822.SIZE INTERNALDATE BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority Importance Priority Content-Type)])"

It turned out that while manipulating a user's inbox, one of the files had incorrect ownership in his maildir and it caused Dovecot to issue that error. Fortunately, Dovecot's logs pointed it out.

AlexF, 2009-05-27


I simple check the maillogs and delete or move the particular .log file which is causing this problem.

NiteshM, 2010-29-10

---


I had 160GB of mailboxes with 2800 accounts, the only way i could solve this problem was to edit the

/usr/lib/courier-imap/etc/imapd

and change MAXDAEMONS=400

from default of 150

!Satish Asnani, 2011-08-30

!Mail Administrator, BHEL, Bhopal

!Contact; 9425604848


Mine was caused by the system time of the storage server (where the Maildir is hosted) being out of sync with the Mailserver running Courier for > 30sec.

IMAP message is:

* BYE Clock skew detected. Check the clock on the file server.

Martin <martin@maxnet.ao> - 2011-09-27

© 1999-2010 by The SquirrelMail Project Team