Spread the word

Sunday, February 19, 2012

How to Enable Change Password for RoundCube Users on BlueHost


RoundCube is simply one of the best open source webmail application available today. Though this application has been created long back and the updates are little bit slow, RoundCube powers several webmail for several companies, including my own DesLabs. My favorite reason to choose RoundCube is that I can easily customize the user interface of the application to show my company logo and I can give several capabilities to my users without the RoundCube name.

Something that we might not like is the lack of an administration panel at the backend where we could have easily manage the features and settings for our webmail. One of such problems I faced when I wanted my webmail users should be able to change their passwords. I am using BlueHost as my web host and create and manage unlimited email accounts under several domains. By default RoundCube don't give the flexibility to allow users change their own passwords.


So here is how to allow RoundCube users to change their own passwords.

Enable Change Password Plugin for RoundCube

First thing that you will need to have is to enable plugin support for RoundCube. Plugins are not used until you add the directory name of the respective plugin to RoundCube config file.

Go to your RoundCube installation directory. Open the directory named config. You will find a file main.inc.php.
Open that file to edit and find $rcmail_config['plugins']. It should be somewhere near line no. 322. This is the variable which keeps track of enabled plugins for RoundCube.

Edit that whole line to look like this -
$rcmail_config['plugins'] = array('password');

This means that RoundCube will now use the plugin under the plugins/password directory. Now your users should be able to see a Password tab under their Settings. But this password plugin needs to be configured properly as per your web hosting provider and your users otherwise it will not work.

Configure RoundCube Password Change Plugin

Browse to plugins/password directory.
You should find a file named config.inc.php.dist. Rename it to config.inc.php.
RoundCube Password Change Plugin can be configured to use following options to change user's password:

  1. cPanel
  2. DirectAdmin Control Panel
  3. LDAP
  4. Database
  5. Cyrus/SASL
  6. Poppassd/Courierpassd
  7. XIMSS/Communigate
  8. Virtualmin
  9. PAM
  10. hMailServer
  11. Chpasswd
  12. XMail

You need to choose whichever way you want your users to change their password. This needs to be set in a variable within the config.nic.php file. Here we will go with the cPanel option which is best suit for BlueHost users.

The default cPanel driver of RoundCube doesn't work. So download the proper cPanel driver for RoundCube password change plugin here. Thanks to awesome work done by RoundCube fan Nick1472 in RoundCube forums.


Now configure your cPanel Driver.

Open config.nic.php file to edit.
Find the variable $rcmail_config['password_driver'] somewhere near line no. 7 and set it like this:

$rcmail_config['password_driver'] = 'cpanel';

Then go on setting the proper options for your cPanel driver. Find cPanel Driver options near line no. 231 and set the following configurations as per your web hosting account.

$rcmail_config['password_cpanel_host'] // the primary domain of your hosting account
$rcmail_config['password_cpanel_username'] // your hosting account's cPanel username
$rcmail_config['password_cpanel_password'] // cPanel password
$rcmail_config['password_cpanel_port'] // default is 2096 for SSL connections and 2095 for non-SSL connections
$rcmail_config['password_cpanel_ssl'] = true;
$rcmail_config['password_cpanel_theme'] = 'bluehost';

That's it! Now login to your email account on RoundCube webmail and go to Settings from the top right.


There you should find a Password tab at the last.
You and your users now can easily change their passwords directly from here.

How to enable multiple Plugins for RoundCube

If you wish to use other plugins as well while you are using the password plugin, then you can do that by just entering the directories of those plugin in the RoundCube config file.

Open main.inc.php file to edit, within the config directory.
Search for the variable $rcmail_config['plugins'] near line no. 322.
Add the directory names of the plugins you want enable for your RoundCube installation -
$rcmail_config['plugins'] = array('password', 'plugin2_directory', 'plugin3_directory');

This is how you can easily enable multiple plugins for your RoundCube open source webmail application. Yes we know this is not easy and user friendly, but as I mentioned earlier that the development of RoundCube has been slowed down.

Feel free to share your experiences while using RoundCube and if any other tricks you used to get this password changing option easily available for your webmail users.

16 comments:

paul said...

I am getting "New password could not be saved" is there another step???

Yaron said...

I think the directory for the different drivers should be mentioned (where cpanel.php or xmail.php should be saved): ......./plugins/password/drivers

Also you might need to download an updated config.inc.php file since older ones don't have the lines at the end for all the different drivers:
http://trac.roundcube.net/browser/trunk/plugins/password/config.inc.php.dist?rev=3954

Sergey said...

I glad i find this interesting post. I need it so mach, but it still not working for me. Some times ago i used password change for RC 0.1 and now i need it again. I install RC 0.8 on bluehhost and try to include this option, but i get "New password could not be saved" too. this link "http://trac.roundcube.net/browser/trunk/plugins/password/config.inc.php.dist?rev=3954" also not worked. What can i do now, i don't know.

Evokam said...

Hello. My hoster is bluehost too and i can't change password in roundcube. Can you tell me please, did you change some think in this line: $rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)'; (password/config.inc.php).
And one more question - when i loging in my cpanel i can see in address bar bluehost.com:2083 what i must insert in this line $rcmail_config['password_cpanel_port'] = (2083 or 2096)?
Thank you very much.

Dave Hudson said...

Nice but does not work. Simple Scripts now has version .8 of RoundCube and when you do this install on BlueHost, the password plugin does not work. I have been able to get it to say "Password Saved" (changed) but it actually does not do anything.

I see a lot of other people having the same issue. I put in a ticket and BlueHost support basically said "sorry - we don't know how to make it work - try google".

Josh Ernal said...
This comment has been removed by the author.
Josh Ernal said...

Hello People, I have more than a domain name attached to my host. I already have created multiple emails ( info@domain1.com & info@domain2.com ) I later tried to open multiple webmail with Round Cube; each for a Domain name but turns out to give Error.
Any idea what I can do?

aparna john said...

Hi, nice description about how to Enable Change Password for RoundCube Users on BlueHost.Thanks,its really helped me...


w said...

I found your blog while searching in search engines, and it is a wonderful one.

Digital Marketing Company said...

Some blog are written in a way that cannot be forgotten, in fact everyone reads it all, you're is one of them. Thanks for the nice post.

Anusia said...

Thanks for sharing the information. It was really interesting to know such facts and as it was very informative.

Amazon deals said...

Thanks. I need to configure my roundcube installation to change passwords I'll try later

Anonymous said...

Hello, I also have BlueHost and I'm not able to change the password. Recognize the actual password but can't change it. Any idea?
Thanks.

Leena Roy said...

Thanks for sharing this great Post dude

website design

Ayesha Zulfiqar said...

Very informative post for me thank you for sharing.
Web Development Services

Aseps WebTech said...

thanks for sharing the awesome blog please share about google update so we can get web designing service according to that parameter.

Post a Comment