Archive for the ‘ Webmail ’ Category

IMAPsync

imapsync – Imapsync is a program to synchronise two IMAP mailboxes, mailbox trees or servers.

We can use this tool for migrating emails from the server that we don’t have back-end access.

imapsync installation

perl -MCPAN -e "install Test::Inter"
perl -MCPAN -e "install Parse::RecDescent"
perl -MCPAN -e "install Getopt::Long"
perl -MCPAN -e "CPAN::Shell->force(qw(install Date::Manip));"
perl -MCPAN -e "CPAN::Shell->force(qw(install Mail::IMAPClient));"
perl -MCPAN -e "CPAN::Shell->force(qw(install Term::ReadKey));"

wget http://packages.sw.be/imapsync/imapsync-1.350-1.el5.rf.noarch.rpm
rpm -i --nodeps imapsync-1.350-1.el5.rf.noarch.rpm

Syntax:

imapsync --host1 <Source_Server> --user1  <source_server_username> --password1 <source_server_pass> --host2 <Desination_Server> --user2   <Destination_Server_username> --password2 <Destination_Server_pass>

Eg:

imapsync --host1 source.com --user1  user@source.com --password1 XXXXXXX --host2 localhost --user2  user@destination.com --password2 XXXXXX

Error: If you receive an error like auth [CRAM-MD5]: 2 NO [ALERT] Unsupported authentication mechanism then please add “–noauthmd5” to the above command.

imapsync --host1 source.com --user1 user@source.com --password1 XXXXXXX --host2 localhost --user2 user@destination.com --password2 XXXXXX --noauthmd5

 

Roundcube hangs when sending mail

In recent builds of roundcube, you may find that you can’t send mail using Roundcube. If /var/cpanel/roundcube/log/errors shows the following:

[30-Jan-2009 14:07:11] Invalid response code received from server (421):
[30-Jan-2009 14:07:11] Invalid response code received from server (-1):
[30-Jan-2009 14:07:34 -0800] SMTP Error: SMTP error: Authentication failure: STARTTLS failed (Code: ) in /usr/local/cpanel/base/3rdparty/roundcube/program/steps/mail/func.inc on line 1248 (POST /3rdparty/roundcube/index.php?_task=mail&_action=send)
[30-Jan-2009 14:10:29] STARTTLS failed ():

Then there is an issue with the most recent Net-SMTP PHP module. To resolve this, edit the following file:

vi /usr/local/cpanel/base/3rdparty/roundcube/config/main.inc.php

and change

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config[‘smtp_user’] = ‘%u’;

to this:

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config[‘smtp_user’] = ”;