Archive for March, 2008

ERROR: Connection dropped by IMAP server :: squirrelmail on cpanel server

March 29, 2008

When logging into squirrelmail on a cpanel server, I received the following error:

ERROR: Connection dropped by IMAP server

To fix this:

chown -R USERNAME:mail /home/USERNAME/mail/
chown -R USERNAME:mail /homeUSERNAME//etc/

Where USERNAME is his cPanel username


Finding php configuration string from php binary installed.

March 25, 2008

Enter the command:
strings `which php` | grep ./configure | sed s#”‘”#””#g

Redirecting network traffic to a new IP using iptables

March 17, 2008

Login to the old server as root and enter the following

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp -dport 80 -j DNAT –to-destination
iptables -t nat -A POSTROUTING -j MASQUERADE

Here the new ip address is Now all the traffic to port 80 will get redirected to port 80 of

(assuming that you do not have other iptables rules blocking access to port 80 )

If you want to redirect traffic to other ports such as for email POP, IMAP, or SSL , you can simply add in additional iptables rules.

For example to have POP3 redirection, you can add in an additional rule like this:

iptables -t nat -A PREROUTING -p tcp –dport 110 -j DNAT –to-destination

You may find this helpful while server migration