Migrating your IMAP mail? Here’s how!

For those of you who are changing their IMAP email account to a different server, there is a very nice utility called imapsync.

The utility is actually written in PERL so it can run on any number of hosts that support PERL scripting, and while it has many config options, here is the actual command we used to transfer an email account from our server to Google Apps Mail account(GMail is the same) from a Linux box:

The command

imapsync \

–host1 thinkovi.com –user1 email@thinkovi.com –password1 mypass1 \

–host2 imap.gmail.com –user2 new@gmail.com –password2 pass2 \

–ssl2 –ssl1 –authmech1 PLAIN –authmech2 LOGIN

  • bear in mind that this utility will work only for email servers supporting IMAP protocol.
  • also, in the above code notice we have used SSL for both connections, and PLAIN authentication for the original server and LOGIN for the imap server at google

READ THE FULL ARTICLE >>

Redirecting url with a rewrite rule

Lets suppose you have made some changes to your website and you want to redirect some pages to their new url format, this .htaccess rewrite rule might come in handy:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)subpage1/subpage2/mypage.html$
RewriteCond %{QUERY_STRING} Itemid=91&page=mypage$
RewriteRule ^(.*)$ http://mynewurl.com/index.php?mypage=new

What the above condition does is redirect /subpage1/subpage2/mypage.html?Itemid=91&page=mypage url to http://mynewurl.com/index.php?mypage=new

Obviously, you need to replace the above names with your actual site names

The second RewriteCond with QUERY_STRING is only needed if the url you want to rewrite has additional parameters like mypage.html?pages=mypage for instance

Recovering from disk failures

Data recovery

Data recovery

As you might know, disk drives, specially in high usage areas like hosting enviroments, have a tendency of crashing from time to time.

Most crashes you will encounter are related to bad blocks on your hard drive which in some cases will stop your operating system from booting, leaving your server at a stop. There are several utilities which can help you detect and fix the bad blocks at a software level, like the FSCK(file system check) available for Linux, or CHKDSK and SCANDISK for Windows, however there are situations when the bad block can’t be fixed, most of the cases due to a critical error.

While this doesn’t happen constantly or too often, it would be nice to think that there might be ways to recover data that might be business critical, and here is how:

READ THE FULL ARTICLE >>

Down and dirty with SquirrelMail

SquirrelMail Logo

SquirrelMail Logo

I have to admit, the gmail and yahoo new email interfaces are great, if you don’t mind the advertising, and very easy to use, however i have been using for a long time SquirrelMail to access the email directly on my server!

While the interface that comes with the cpanel installation is very basic, there is one thing i would have liked to have, like in Yahoo, when you get an email, the page title automatically changes with the number of unread emails!

READ THE FULL ARTICLE >>

Installing PHP on Windows got easier! finally….!

Microsoft Web Platform

Microsoft Web Platform

It seems that, earlier this year, Microsoft released a small application called Web Platform Installer , a utility meant to be dead simple to install a range of web applications and get your website up and going fast on a IIS server.

Beside the usual Microsoft web applications support like ASP.NET and SQL SERVER, they also added support for PHP, facilitating this way the installation of a range of web publishing tools like Drupal, Moodle and Wordpress, hope I see some Joomla! there as it’s fairly popular.

Would also be nice to hear they also added support for Python, so that we can start serving code to Google, kidding :) , but it wouldbe nice.

A small review of this service can be found here , thanks to Louis Simoneau.