Move Squirrelmail to new web server

I recently rebuild an OS X webserver and migrated websites from an old Panther box. I had a website that was using Squirrelmail and this is what I ran into in moving the site over.

#1. I wasn’t able to login to the website with a valid username and password. I kept getting an APPEND error so I found this in a google search:

Ok. I debugged squirrelmail a little, and I found out, that the error occurs when sending the APPEND Command to IMAP.

I found the error in functions/imap_general.php

Reason: The following command is sent to imap when trying to append the sent message to “Sent” folder:

A004 APPEND "Sent" (\Seen) {$length}

The $length value is not parsed / replaced by php. So I changed line 891 from

fputs ($imap_stream, sqimap_session_id() . " APPEND
\"$sent_folder\" (\\Seen) \{$length}\r\n");

to

fputs ($imap_stream, sqimap_session_id() . " APPEND
\"$sent_folder\" (\\Seen) {" . $length . "}\r\n");
That resolved the issue of logging in. 

#2. Then I was able to login but I couldn't send out messages.  
I found other google posts that pointed here so I followed the instructions in both posts below and 
was able to get send and receive working. These changes were due to the fact that the new server is running a 
more current version of PHP
http://squirrelmail.cvs.sf.net/squirrelmail/squirrelmail/class/ \
 deliver/Deliver.class.php?r1=1.18.2.22&r2=1.18.2.23
http://squirrelmail.cvs.sf.net/squirrelmail/squirrelmail/class/ \
 mime/Message.class.php?r1=1.17.2.8&r2=1.17.2.10

#3 All was working except attachments. I found all the posts about checking file_uploads enabled in php.ini 
I increased the upload size to 25M even though the attachments were 4kB.  I checked what I thought was the directory the
attachments were being save to and none of it resolved the issue. I ran the config/conf.pl and the system squirrelmail said the
attachments were at /var/db/squirrelmail/attachments.
BUT ATTACHMENTS STILL NOT WORKING!!!

#4. FINALLY I found this http://sitename.com/src/configtest.php and found that my attachments directory for 
that particular site was different than the one from the conf.pl command line! I created the directory and edited the permissions
as appropriate and viola! Finally all is working!
About these ads
  1. No trackbacks yet.

You must be logged in to post a comment.
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: