+ Reply to Thread
Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 48

Thread: Password plugins

  1. #1
    remrem is offline Registered User
    Join Date
    Jun 2009
    Posts
    5
    Downloads
    0
    Uploads
    0

    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

  2. #2
    remrem is offline Registered User
    Join Date
    Jun 2009
    Posts
    5
    Downloads
    0
    Uploads
    0

    Default

    Anyone have an idea ? other plugins ?

  3. #3
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,392
    Downloads
    36
    Uploads
    0

    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 Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

  4. #4
    remrem is offline Registered User
    Join Date
    Jun 2009
    Posts
    5
    Downloads
    0
    Uploads
    0

    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

  5. #5
    remrem is offline Registered User
    Join Date
    Jun 2009
    Posts
    5
    Downloads
    0
    Uploads
    0

    Default

    rosali, Your solution work perfectly !

    Big thank !
    Now ... fire in the skins

  6. #6
    fms
    fms is offline Registered User
    Join Date
    Jun 2009
    Location
    Gramado/RS - Brasil
    Posts
    13
    Downloads
    1
    Uploads
    0

    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!

  7. #7
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,392
    Downloads
    36
    Uploads
    0

    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.
    Last edited by rosali; 07-02-2009 at 05:42 AM.
    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

  8. #8
    remrem is offline Registered User
    Join Date
    Jun 2009
    Posts
    5
    Downloads
    0
    Uploads
    0

    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 ?

  9. #9
    fms
    fms is offline Registered User
    Join Date
    Jun 2009
    Location
    Gramado/RS - Brasil
    Posts
    13
    Downloads
    1
    Uploads
    0

    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

  10. #10
    seanand is offline Registered User
    Join Date
    Sep 2009
    Posts
    1
    Downloads
    0
    Uploads
    0

    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

+ Reply to Thread
Page 1 of 5 1 2 3 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts