This Post is resolved :) thanks rosali
Hi all ;)
First, sorry for my English ... :/
I have a problem with the password plugins...
I want use it with
$rcmail_config['password_driver'] = 'sql';
But my mail password is in an other db (postfix) ...
Server: localhost - database: postfix - Table: mailbox
How I can modify the password ?
Or ... if you have a nice How to for install and config for poppassd on debian lenny with postfix and virtual mail ... ;)
Big thanks ;)
Anyone have an idea ? other plugins ?
// SQL Driver options
// ------------------
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
$rcmail_config['password_db_dsn'] = 'mysql://postfix:pass@localhost/mailbox';
... assuming you are using MySQL. Also you have analyze the table structure of mailbox and to adjust ...
$rcmail_config['password_query'] = 'UPDATE `hm_accounts` SET `accountpassword` = %c, `accountpwencryption` = '2' WHERE `accountaddress` = %u LIMIT 1;';
The example above is for hMailServer. I don't know postfix database structure. You have to adjust the query string accordingly. For available macros check the hints in the config file.
Hi rosali,
Big thank for your solution, I try this in few hours...
I post here if your solution resolve my problem (or no ... :( )
Rémi :)
rosali, Your solution work perfectly !
Big thank !
Now ... fire in the skins ;)
Please help with password plugin.
I'm having the error: "Could not save new password."
my /usr/local/www/roundcube/plugin/password/config.inc.php
-----------------------------------------------------------
$rcmail_config['password_driver'] = 'sql';
$rcmail_config['password_db_dsn'] = 'mysql://postfix:mypass@localhost/postfix';
// I tried this too:
// $rcmail_config['password_db_dsn'] = 'mysql://postfix:mypass@unix(/tmp/mysql.sock)/postfix';
$rcmail_config['password_query'] = "UPDATE `mailbox` SET `password` = '%c', `modified` = date_format(now(),'%Y-%m-%d %H:%i:%s') WHERE `username` = '%u' LIMIT 1";
-----------------------------------------------------------
Can you see any errors on my settings?
Is there some LOG where I could watch to see if my query is being executed?
Thank you in advance for any help!
$rcmail_config['password_db_dsn'] = 'mysql://postfix:mypass@localhost/postfix';
Is the password for mysql postfix user really mypass ?
Also it should not be necessary to quote macros.
Hi,
`modified` = date_format(now(),'%Y-%m-%d %H:%i:%s')
remove this ! I think the password dont change because, no quote for dateformat .... ;)
N.B. My english sucks very well ... no ?
( it WORKED! )
Hi Rosali.
No, no, my password for mysql postfix is another one. And I verified it and it is correct, i.e. I connect using a mysql-client with my "real" password and it works. On my "real" config.inc.php, I use my "real" pass unless "mypass".
I removed:
`modified` = date_format(now(),'%Y-%m-%d %H:%i:%s')
and I removed quotes on macros %c and %u:
$rcmail_config['password_query'] = "UPDATE `mailbox` SET `password` = %c WHERE `username` = %u LIMIT 1";
// and this way works too:
$rcmail_config['password_query'] = "UPDATE `mailbox` SET `password` = %c, modified=now() WHERE `username` = %u LIMIT 1";
(it worked! -- let me ask: is there any LOG where I could watch and look for errors like this one?)
thank you !!!
Using postfix admin, this worked for me:
its based off of fms's
$rcmail_config['password_query'] = "UPDATE mailbox SET password = ENCRYPT(%p), modified=now() WHERE username = %u LIMIT 1;"
Sean
Hi
Has anyone gotten this to work with cpanel? Currently I have .2.2 working with [v0.2] cPanel Addon (Password, Forward & Vacation), by nemesis, but want to upgrade to .3 stable.
Looking for some guidance..... thanks!
I would be interested in that as well. I tried to figure it out on my own but just don't have the php skills or knowledge of how cpanel e-mail works.
Tom
Hello i tried this
I want use it with
$rcmail_config['password_driver'] = 'sql';
$rcmail_config['password_db_dsn'] = 'mysql://comp35_rnd02:3aRqSzgezi@localhost/com35_rnd02';
$rcmail_config['password_query'] = 'UPDATE mailbox SET password=%p WHERE username=%u AND password=%o AND domain=%d LIMIT 1';
this i get cannot save the password or sometime blank page.. pLease help
are you sure you want username=%u and not username=%l? check the rc error log (rc root/logs/) for any info.
Hello i am not getting any error in log,
I am getting cannot save password !
Please help me I wil be really thankful to you!
If you need my ftp account for mail i can give :) But please help :) Please please it has a week i am trying on ..
Do i have to create password database in msql if yes then how .. Please provide me steps if possible from starting with database and please...
Quote from: sumit9451;21637Hello i tried this
I want use it with
$rcmail_config['password_driver'] = 'sql';
$rcmail_config['password_db_dsn'] = 'mysql://comp35_rnd02:3aRqSzgezi@localhost/com35_rnd02';
$rcmail_config['password_query'] = 'UPDATE mailbox SET password=%p WHERE username=%u AND password=%o AND domain=%d LIMIT 1';
this i get cannot save the password or sometime blank page.. pLease help
Try this:
$rcmail_config['password_db_dsn'] = 'mysql://<user>:<password>@unix(/tmp/mysql.sock)/<database>';
$rcmail_config['password_query'] = "UPDATE `mailbox` SET `password` = %c, modified=now() WHERE `username` = %u LIMIT 1";
In your case:
$rcmail_config['password_db_dsn'] = 'mysql://comp35_rnd02:3aRqSzgezi@unix(/tmp/mysql.sock)/your-database-name';
$rcmail_config['password_query'] = "UPDATE `mailbox` SET `password` = %c, modified=now() WHERE `username` = %u LIMIT 1";
ITs saying not able to connect database .. Cannot save password. !
Are you sure
your login on database
is "comp35_rnd02"
and your password is "3aRqSzgezi" ?
First of all, you should try to assure you can log in and can access the database.
Try to use heidisql (http://www.heidisql.com) to test if you can connect to the database.
YEs i can access it .. i have tried can you send me once again step by step instruction from starting so i can try once again ... please i used simplescript to uplaod roundcube mail script.. this is my mysql server status
* Server: Localhost via UNIX socket
* Server version: 5.0.81-community-log
* Protocol version: 10
* User: comp35_rnd02@localhost
* MySQL charset: UTF-8 Unicode (utf8)
Web server
* Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8k DAV/2 mod_auth_passthrough/2.1 FrontPage/5.0.2.2635
* MySQL client version: 5.0.81
* PHP extension: mysqli
Where are your users? on what database?
Lets say:
1) your mysql-user: comp35_rnd02
2) your mysql-password:3aRqSzgezi
3) your mysql-database: postfix
So, user comp35_rnd02 should have rights to access postfix database from localhost (assuming RoundCube is running on same machine where mysql is)
#mysql
mysql> GRANT ALL ON postfix.* TO comp35_rnd02@localhost IDENTIFIED BY '3aRqSzgezi'; FLUSH PRIVILEGES;
exit
So, your password-plugin config is something like this:
/usr/local/www/roundcube/config/password/config.inc.php
$rcmail_config['password_db_dsn'] = 'mysql://comp35_rnd02:3aRqSzgezi@unix(/tmp/mysql.sock)/postfix';
$rcmail_config['password_query'] = "UPDATE `mailbox` SET `password` = %c, modified=now() WHERE `username` = %u LIMIT 1";
@fms: The problem of sumit9451 is, that he is using the imap server of his host. His webspace is controlled by cpanel. I don't think that he has access to postfix database. I'm not familiar with cpanel. I don't know if it is even possible to code a suiteable driver for the current password plugin. MySQL - at least with the credential posted by sumit 9451 - has only access to the RoundCube database.
humm ok Rosali.
In this case, I dont know a solution for him.
SO tell me the way ... is this not for cpanel .. what you need just tell me so i can find and tell you.. pzzzzzzzzzzzzzz
i have one idea if you support me ... tell me where should i install roundcube manually and i have full control for cpanel...
This is the change password from cpanel .. if this helps your for me then i am really happy please
https://host293.hostmonster.com:2083/frontend/hostmonster/mail/passwdpop.html?redirectdomain=&email=123&domain=computertreasure.com
You don't understand the structure:
RoundCube is a IMAP server client.
The backend is a IMAP server.
The IMAP server or a backend of the IMAP server administers users and passwords.
Really deep insights to your imap server and the user/password administration are necessary to code a php script to jump into it.
At the moment no skilled php programmer and cpanel user has coded a password change driver ...
hello,
i use roundcube 0.3.2.30 and have a problem with the Password Plugin. If try to change a Password, there is always the 'internalerror' Message. But if i try out the wrong 'curpasswd' , roundcube detect that it is the wrong psw. and put out the 'passwordincorrect' message.
Seems like Roundcube cant write to the DB.
I use mysql, postfix
There is a error in the log:
apache2: MDB2 Error: not found (-4): _doQuery: [Error message: Could not execute statement] [Last executed query: SELECT update_passwd('qtr$hjhtdjrtdjrdjrtz345z54rt', '[email protected]')] [Native code: 1305] [Native message: FUNCTION roundcubemail.update_passwd does not exist]
Quote from: yinzhen;25965hello,
i use roundcube 0.3.2.30 and have a problem with the Password Plugin. If .......
uff. a solution.....
first i discovered that the old changepswd plugin (0.2.1) work. so i copied some lines. but in the end (like first page in this thread) it works with:
$rcmail_config['password_db_dsn'] = 'mysqli://username:gfd534PASSgdfGGERR53@localhost/vmail';
$rcmail_config['password_query'] = "UPDATE `mailbox` SET `password` = %c, modified=now() WHERE `username` = %u LIMIT 1";
Hi every body, I have install :
1. windows xp
2. wampserver 2.0
3. Hmail 5.3.2
4. Roucube mail 0.3.1
Now can send/Reicv with webmail, pop.. but cannot change password. I have try password
plugin but now success. I think infomation data of user in hmail\database
folder\hmailserver.sdf not in mysql (mysql.initial.sql) . Pls help me.
Hi there,
I'm using postfix*postfixadmin+roundcube(4) but I have got one problem I've tried what you have been posted for my case that I think its a general case as indented here.
But got one problem made log on level 4 of roundcube.
When I try to change the password I saw this .
"Parse error: syntax error, unexpected '*' in /var/www/rc3/plugins/password/drivers/sql.php on line 51"
This appears after pressing button to save password it's almost imediatley.
Any help would be appreciated.
No chance of help ?
Did you configure the following section properly?
// SQL Driver options
// ------------------
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
$rcmail_config['password_db_dsn'] = '';
// The SQL query used to change the password.
// The query can contain the following macros that will be expanded as follows:
// %p is replaced with the plaintext new password
// %c is replaced with the crypt version of the new password, MD5 if available
// otherwise DES.
// %D is replaced with the dovecotpw-crypted version of the new password
// %o is replaced with the password before the change
// %n is replaced with the hashed version of the new password
// %q is replaced with the hashed password before the change
// %h is replaced with the imap host (from the session info)
// %u is replaced with the username (from the session info)
// %l is replaced with the local part of the username
// (in case the username is an email address)
// %d is replaced with the domain part of the username
// (in case the username is an email address)
// Escaping of macros is handled by this module.
// Default: "SELECT update_passwd(%c, %u)"
$rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
The query should be something like:
UPDATE mailbox SET password=%c WHERE username=%u
Hi there,
I use like this:
$rcmail_config['password_query'] = "UPDATE mailbox SELECT password = %c WHERE username = %u";
And I got the following error:
Parse error: syntax error, unexpected '*' in /var/www/rc3/plugins/password/drivers/sql.php on line 51
Try without spaces and SELECT is wrong in this context.
$rcmail_config['password_query'] = "UPDATE mailbox SET password=%c WHERE username=%u";
Hi,
Thanks
for the awnser
But it happends the same :
Parse error: syntax error, unexpected '*' in /var/www/rc3/plugins/password/drivers/sql.php on line 51
in sql.php line 51
I found this :
* $sql = str_replace('%c', $db->quote(crypt($passwd, CRYPT_MD5 ? '$1$'.$salt.'$' : $salt)), $sql);
I removed the asterisk and I've got this:
DB Error in /var/www/rc3/program/include/rcube_mdb2.php (627): MDB2 Error: syntax error Query: _doQuery: [Error message: Could not execute statement] [Last executed query: UPDATE mailbox SET password='$1$50SZH$ec36cegLTG2MSqm7jZ3X11' WHERE username=''
[email protected]''] [Native code: 1064] [Native message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
[email protected],''' at line 1]
It worked some problems on '%u' removed and it worked
Thanks a lot.
@tmsam ... meanwhile there is a driver for hmailserver. Check out recent svn trunk version.
HI there
Everything works fine with rc4 and it's marvelous when I try to change languages to portuguese I get a blank screen when trying to execute the plugin from the interface.
Is it any bug or something that I make wrong ?
In english works
In portuguese (blank screen)
Thanks in advanced.
Anyone with same problem ?
Works for me with portugues. Please post your pt_PT language file and check error logs.
This is labels.inc
And I added the following but if i remove the problem is the same:
Quote$labels['changepasswd'] = 'Alterar password';
$labels['curpasswd'] = 'Password atual:';
$labels['newpasswd'] = 'Nova password:';
$labels['confpasswd'] = 'Confirmar password:';
And I had the same like labesl.inc and add this:
Quote$messages['nopassword'] = 'Introduza a nova password.';
$messages['nocurpassword'] = 'Introduza a password actual.';
$messages['passwordincorrect'] = 'Password actual errada.';
$messages['passwordinconsistency'] = 'Password\'s nao combinam, tente novamente..';
$messages['crypterror'] = 'Nao foi possivel gravar a nova password. Funcao de criptografica inexistente.';
$messages['connecterror'] = 'Nao foi possivel gravar a nova password. Erro de ligacao';
$messages['internalerror'] = 'Nao foi possivel gravar a nova password.';
In logs there are no reported errors
Why did you alter the program localization? The plugin has it's own localization in ./plugins/password/localization.
You should not have to alter anything!
Hi there,
I didn't alter any path of files I just add inside each file what I've quoted before
the path still the same
I meant you need not to add plugin localization to the default localization.
Sorry I couldn't understanda what are you saying could tyou detail more ?
Anyone could explain to me ?
Anyone with same problem ?