Control Web Panel

WebPanel => E-Mail => Topic started by: qisoed on October 15, 2014, 07:00:10 AM

Title: Change E-Mail Password
Post by: qisoed on October 15, 2014, 07:00:10 AM
How to change user email password but not from the web panel? Because I set the web panel area is limited to admin only and also user wants to keep their password privately, not known by the admin. I've try to search in roundcube and didn't found any clue to it.
Title: Re: Change E-Mail Password
Post by: erm3nda on October 15, 2014, 09:32:50 PM
Password will be user level.

So, create a new user for each person. Each person will login into a "user" panel, where can manage emails accounts, passwords and more. Passwords are hashed, so you can override it, but cannot know was the real previous password.

So, person data is not really "shown" to admin, even if is from admin account.

Tell me if im wrong.
Regards.
Title: Re: Change E-Mail Password
Post by: Administrator on October 15, 2014, 11:28:45 PM
in web panel you can login as root or as user, and with user level you can manage email accounts.
Title: Re: Change E-Mail Password
Post by: fandi_mlg on December 27, 2014, 10:23:06 AM
I think the question is how to change the password of email account from roundcube webmail with activate password plugin. How to activate the password plugin? thanks.
Title: Re: Change E-Mail Password
Post by: erm3nda on December 30, 2014, 08:57:49 AM
Doh, I´m sorry. Do not figure OUT was that.

Basically, GO to mail section (yourdomain.com:2030/index.php?module=mail_list)
Click ON THE NAME of the mailbox you wanna edit.
Edit or/and Save your new password.

As i have see now, root admin can change password and see it.
Anyway, if you have a passwd you will advert about the change.

No matter if you wanna hide passw from admin, it can log into ANY user account then set email again, and SEE it. For the most paranoids, you must know that emails can be readed in a plain text format with NO AUTHORIZATION *, because that layer of security is email server based, not filesystem based. Only PGP (2.6 or above) signed emails will be safe from a sysadmin.

* This happends in MOST hosting panels. Emailing is not an encrypted thing.
Title: Re: Change E-Mail Password
Post by: cgo372 on January 16, 2015, 04:46:14 PM
I think the question is how to change the password of email account from roundcube webmail with activate password plugin. How to activate the password plugin? thanks.

That is also what I'd like to know:
I changed the following:
- in main.inc.conf $rcmail_config['plugins'] = array('password');
- I changed config.inc.conf.dist in config.inc.php and enabled the following lines:

$rcmail_config['password_db_dsn'] = 'mysql://mypassword@localhost/roundcube';
taken from DB.inc.conf $rcmail_config['db_dsn'] = 'mysqli://roundcube:mypassword@localhost/roundcube';

$rcmail_config['password_query'] = 'UPDATE mail_user SET password=%c WHERE email=%u LIMIT 1';

I restarted httpd but I get the password line in Roundcube, the 3 lines with current password, new password and repeat new password but when I want to change the password it says password can't be saved, What Am I doing wrong here? please any help?

Title: Re: Change E-Mail Password
Post by: Administrator on January 19, 2015, 03:15:17 AM
and how would this plugin change your email password if it has NO access to the mail server database?
roundcube is using dovecot/smtp for connection when checking for emails.
Title: Re: Change E-Mail Password
Post by: cgo372 on January 19, 2015, 10:27:05 AM
I'm sorry, but what you wrote sounds like chinese to me and it is not really helpful to solve problems
Title: Re: Change E-Mail Password
Post by: erm3nda on January 20, 2015, 08:07:45 PM
and how would this plugin change your email password if it has NO access to the mail server database?
roundcube is using dovecot/smtp for connection when checking for emails.

Im guessing that Roundcube has a plugin capable to edit.
i found, is this: http://trac.roundcube.net/browser/github/plugins/password/README

I guess you must supply root server account and password and not any cwp user you created but im not sure. You do the best triying first a cwp user and testing it.

Title: Re: Change E-Mail Password
Post by: Administrator on March 18, 2015, 01:07:55 AM
you would probably need to edit this plugin and allow him the access to the postfix database to edit account passwords.
Title: Re: Change E-Mail Password
Post by: infinitech07 on October 11, 2015, 03:38:15 PM
Quote
That is also what I'd like to know:
I changed the following:
- in main.inc.conf $rcmail_config['plugins'] = array('password');
- I changed config.inc.conf.dist in config.inc.php and enabled the following lines:

$rcmail_config['password_db_dsn'] = 'mysql://mypassword@localhost/roundcube';
taken from DB.inc.conf $rcmail_config['db_dsn'] = 'mysqli://roundcube:mypassword@localhost/roundcube';

$rcmail_config['password_query'] = "UPDATE mailbox SET password=CONCAT('{PLAIN-MD5}', MD5(%p)),modified=NOW() WHERE username=%u LIMIT 1";

I restarted httpd but I get the password line in Roundcube, the 3 lines with current password, new password and repeat new password but when I want to change the password it says password can't be saved, What Am I doing wrong here? please any help?

These are steps I did for the change password plugin on roundcube:
1. Edit the line on /usr/local/apache/htdocs/roundcube/config/config.inc.php into
Quote
$config['plugins'] = array('password');

2. Open up the file /usr/local/cwpsrv/htdocs/resources/admin/include/postfix.php and note down the password.

3. Next, open up the file /usr/local/apache/htdocs/roundcube/plugins/password/config.inc.php and set the following
Quote
$config['password_driver'] = 'sql';
Quote
$config['password_db_dsn'] = 'mysql://postfix:password@localhost/postfix';

** Replace the password with the password you have noted down earlier.
Quote
$config['password_query'] = "UPDATE mailbox SET password=CONCAT('{PLAIN-MD5}', MD5(%p)),modified=NOW() WHERE username=%u LIMIT 1";

That's it. It worked for me. Cheers.  ;)
Title: Re: Change E-Mail Password
Post by: Administrator on October 12, 2015, 05:40:58 PM
sounds interesting, once tested we will add this info on the wiki.
Title: Re: Change E-Mail Password
Post by: vinnie on November 29, 2015, 06:48:24 PM
Hello, Did it work for anyone? I tried the settings as described, including this one "$config['password_query'] = 'UPDATE mailbox SET password=%c,modified=NOW() WHERE username=%u LIMIT 1';"
But I still get the error cannot save new password. I also tried with the default value for this config. $rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
Still did not work for me.
Is there anything that I am missing, do you think? Would really love to have this option.

Thanks.
Title: Re: Change E-Mail Password
Post by: Bausch on December 15, 2015, 10:56:44 PM
The instructions above only worked for me after I upgraded roundcube to version 1.1.3 following the instructions in this link.
https://panel.bullten.net/knowledgebase/31/Update-Roundcube-in-CWP.html

Title: Re: Change E-Mail Password
Post by: infinitech07 on January 07, 2016, 01:32:42 PM
Hello, Did it work for anyone? I tried the settings as described, including this one "$config['password_query'] = 'UPDATE mailbox SET password=%c,modified=NOW() WHERE username=%u LIMIT 1';"
But I still get the error cannot save new password. I also tried with the default value for this config. $rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
Still did not work for me.
Is there anything that I am missing, do you think? Would really love to have this option.

Thanks.

I just done it on another server for my client and it still worked for me.  ;D

The password query should work if you never set or change the default webmail database. Make sure you have the right settings on those config files OR you may check the error stated on log file.

Hope this help.
Title: Re: Change E-Mail Password
Post by: ManuKaracho on January 16, 2016, 11:06:15 AM
Hello, Did it work for anyone? I tried the settings as described, including this one "$config['password_query'] = 'UPDATE mailbox SET password=%c,modified=NOW() WHERE username=%u LIMIT 1';"
But I still get the error cannot save new password. I also tried with the default value for this config. $rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
Still did not work for me.
Is there anything that I am missing, do you think? Would really love to have this option.

Thanks.

thanks mate!! awesome tutorial. should be part of the official wiki!
to vinnie: check if you provided the password in the format mysql://postfix:YOURPASSWORD@localhost/postfix
that made it work for me

I just done it on another server for my client and it still worked for me.  ;D

The password query should work if you never set or change the default webmail database. Make sure you have the right settings on those config files OR you may check the error stated on log file.

Hope this help.
Title: Re: Change E-Mail Password
Post by: Administrator on February 12, 2016, 11:18:47 PM
instructions are here
http://wiki.centos-webpanel.com/roundcube-password-change-plugin
Title: Re: Change E-Mail Password
Post by: crmgddn63 on April 13, 2016, 06:32:24 AM
To enable the email account password change option from roundcube, you can add the following in file:
/usr/local/apache/htdocs/roundcube/config/main.inc.php

Don’t forget to replace your postfix user “PASSWORD”

$rcmail_config['plugins'] = array('password');
$rcmail_config['password_driver'] = 'sql';
$rcmail_config['password_db_dsn'] = 'mysql://postfix:PASSWORD@localhost/postfix';
$rcmail_config['password_query'] = "UPDATE mailbox SET password=CONCAT('{PLAIN-MD5}', MD5(%p)),modified=NOW() WHERE username=%u LIMIT 1";

what is my postfix user pass ? :)
Title: Re: Change E-Mail Password
Post by: Administrator on April 13, 2016, 08:10:11 AM
You can find your postfix password here:
grep pass /etc/postfix/mysql-virtual_mailbox_maps.cf