I am posting this because I was unable to find a suitable solution on
google or the mailing list archives.  I also sending it to the Debian
maintainer in case he wants to show a warning during the install.

We have recently begun deploying SM as the standard MUA.  We were having
some problems which were being attributed to SM.  Knowing that many other
people/organizations use SM, I was hesistant to post a bug report.  So I
looked further into it.

Here is the setup:
    Dell PowerEdge
    Dual Intel P4 Xeon 2.4 GHz
    2 GB RAM
    280 GB SCSI HDD
    Debian 3.0
    inetd from netkit 0.10 (netkit-inetd_0.10-9)
    uw-imapd 2001a (uw-imapd-ssl_2001adebian-6)
    postfix 1.1.11 (postfix_1.1.11-0.woody2)
    squirrelmail (squirrelmail_1.2.6-1)
    ~300 users

The symptom:

Seemingly at random times everyone who was logged on to SM would start
receiving the same errors in their Folders frame (most people have the
folders being automatically updated every 3-5 minutes).  If they tried to
refresh their main frame, the errors would appear there.  The errors
complained about invalid File-Handle:

    Warning: Supplied argument is not a valid File-Handle resource in \
    /usr/share/squirrelmail/functions/imap_general.php on line N

The lines that had complaints were 38, 62, 81, and 137 (most likely
version specific).
The search:

Searching the web (google) and the mailing list archives (sf), I was
unable to find a suitable solution for this problem.  I looked through
/var/log/syslog, but postfixes verbosity made it difficult to find the
needle in the haystack that was causing the problem.

The solution:

Since I had the source code, I was able to see that all these lines were
reading (fputs) or writing (fgets) to the $imap_stream.  This helped me to
figure that problably something was causing the imap connection to die,
which lead me away from squirrelmail and to imapd and inetd.  Looking more
closely through /var/log/syslog, I saw that at the times the problems
occurred, there were a lot of imap connections.  Knowing this was handled
by inetd, I grep'ed the logs for inetd and came up with lines like the
following:

    inetd[200]: imap2/tcp server failing (looping), service terminated

at the exact times the problems were appearing.  Googling on this I found
out about the maximum connection limit for a server per limit in
inetd.conf.  The default is 40 for the version of inetd that I am using. 
This can be increased in /etc/inetd.conf by appending a .MAX to the nowait
field for imap2:

    imap2 stream tcp nowait.10000 root /usr/sbin/tcpd /usr/sbin/imapd

and restarting inetd (# /etc/init.d/inetd restart).

I think that should fix the problem and hopefully this email help anyone
else who might be having the same problem.

Finally, thanks to the SM developers for a great product.


dd
-- 
David Dooling





-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
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