RoundCube Webmail Forum  

Go Back   RoundCube Webmail Forum > Third Party Contributions > API Based Plugins

For more information about the ads and why they're here, please see the FAQ
Reply
  #1  
Old 06-26-2009, 12:44 PM
Registered User
 
Join Date: Jun 2009
Posts: 5
Default Resolved - Password plugins

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

Last edited by remrem; 07-01-2009 at 10:19 PM. Reason: Resolved - Password plugins
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 06-30-2009, 08:17 PM
Registered User
 
Join Date: Jun 2009
Posts: 5
Default

Anyone have an idea ? other plugins ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 07-01-2009, 09:18 AM
rosali's Avatar
Super Moderator
 
Join Date: Dec 2007
Location: Germany
Posts: 1,423
Default

PHP Code:
// 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 ...

PHP Code:
$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.
__________________
Regards,
Rosali

__________________
MyRoundcube Project http://myroundcube.googlecode.com
MyRoundcube Forum http://http://www.roundcubeforum.net...45-myroundcube
MyRoundcube Online Demo http://mail4us.net
MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube
Mailing List http://mail4us.net/?_action=plugin.nabble
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 07-01-2009, 01:28 PM
Registered User
 
Join Date: Jun 2009
Posts: 5
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 07-01-2009, 10:14 PM
Registered User
 
Join Date: Jun 2009
Posts: 5
Default

rosali, Your solution work perfectly !

Big thank !
Now ... fire in the skins
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 07-02-2009, 04:23 AM
fms fms is offline
Registered User
 
Join Date: Jun 2009
Location: Gramado/RS - Brasil
Posts: 13
Send a message via MSN to fms
Default

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 07-02-2009, 05:40 AM
rosali's Avatar
Super Moderator
 
Join Date: Dec 2007
Location: Germany
Posts: 1,423
Default

$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.
__________________
Regards,
Rosali

__________________
MyRoundcube Project http://myroundcube.googlecode.com
MyRoundcube Forum http://http://www.roundcubeforum.net...45-myroundcube
MyRoundcube Online Demo http://mail4us.net
MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube
Mailing List http://mail4us.net/?_action=plugin.nabble

Last edited by rosali; 07-02-2009 at 05:42 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 07-02-2009, 07:24 AM
Registered User
 
Join Date: Jun 2009
Posts: 5
Default

Hi,

PHP Code:
`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 ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 07-02-2009, 12:46 PM
fms fms is offline
Registered User
 
Join Date: Jun 2009
Location: Gramado/RS - Brasil
Posts: 13
Send a message via MSN to fms
Default

( 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:
PHP Code:
`modified` = date_format(now(),'%Y-%m-%d %H:%i:%s'
and I removed quotes on macros %c and %u:
PHP Code:

$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 !!!

Last edited by fms; 07-02-2009 at 12:59 PM. Reason: to improve solution
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 09-05-2009, 06:04 AM
Registered User
 
Join Date: Sep 2009
Posts: 1
Default This worked for me.

Using postfix admin, this worked for me:

its based off of fms's

PHP Code:
$rcmail_config['password_query'] = "UPDATE mailbox SET password = ENCRYPT(%p), modified=now() WHERE username = %u LIMIT 1;" 
Sean

Last edited by seanand; 09-05-2009 at 06:06 AM. Reason: Added PHP tags
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


For more information about the ads and why they're here, please see the FAQ

All times are GMT. The time now is 01:24 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright © 2006-2008 RoundCube Webmail Community