Author Topic: Resolved - Password plugins  (Read 47873 times)

Offline remrem

  • Newbie
  • *
  • Posts: 5
Resolved - Password plugins
« on: June 26, 2009, 07:44:01 AM »
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 Edit: July 01, 2009, 05:19:45 PM by remrem »

Offline remrem

  • Newbie
  • *
  • Posts: 5
Password plugins
« Reply #1 on: June 30, 2009, 03:17:59 PM »
Anyone have an idea ? other plugins ?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password plugins
« Reply #2 on: July 01, 2009, 04:18:57 AM »

// 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.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline remrem

  • Newbie
  • *
  • Posts: 5
Password plugins
« Reply #3 on: July 01, 2009, 08:28:43 AM »
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 :)

Offline remrem

  • Newbie
  • *
  • Posts: 5
Password plugins
« Reply #4 on: July 01, 2009, 05:14:53 PM »
rosali, Your solution work perfectly !

Big thank !
Now ... fire in the skins ;)

Offline fms

  • Jr. Member
  • **
  • Posts: 13
Password plugins
« Reply #5 on: July 01, 2009, 11:23:25 PM »
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!
Francisco

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password plugins
« Reply #6 on: July 02, 2009, 12:40:19 AM »
$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.
« Last Edit: July 02, 2009, 12:42:44 AM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline remrem

  • Newbie
  • *
  • Posts: 5
Password plugins
« Reply #7 on: July 02, 2009, 02:24:40 AM »
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 ?

Offline fms

  • Jr. Member
  • **
  • Posts: 13
Password plugins
« Reply #8 on: July 02, 2009, 07:46:26 AM »
( 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 !!!
« Last Edit: July 02, 2009, 07:59:28 AM by fms »
Francisco

Offline seanand

  • Newbie
  • *
  • Posts: 1
This worked for me.
« Reply #9 on: September 05, 2009, 01:04:58 AM »
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
« Last Edit: September 05, 2009, 01:06:32 AM by seanand »

Offline blair.sawler

  • Jr. Member
  • **
  • Posts: 34
cpanel addons
« Reply #10 on: September 06, 2009, 09:04:07 AM »
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!

Offline Big Tom

  • Newbie
  • *
  • Posts: 3
Password plugins
« Reply #11 on: September 14, 2009, 11:29:20 AM »
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

Offline sumit9451

  • Jr. Member
  • **
  • Posts: 16
Please help me :)
« Reply #12 on: September 23, 2009, 11:29:28 PM »
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

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Password plugins
« Reply #13 on: September 24, 2009, 02:43:50 AM »
are you sure you want username=%u and not username=%l? check the rc error log (rc root/logs/) for any info.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline sumit9451

  • Jr. Member
  • **
  • Posts: 16
Hello ! PLease help
« Reply #14 on: September 24, 2009, 09:39:30 AM »
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!