ISPConfig & RoundCube

Discussion in 'General' started by autogun, Sep 19, 2009.

  1. autogun

    autogun New Member

    Howdy,

    Im using ISPConfig 3.0.1.4, I've created a website, uploaded and configured RoundCube 0.3-stable. The mail client works and doing it's job.

    The only thing that's bothering me is -
    After creating a freshly new mailbox, logging in with RoundCube mail client shows me one folder only - "Inbox".
    When I log-in to the same mailbox using SquirrelMail, I see the folders Inbox, Drafts, Sent and Trash.

    Now when I log-in to the mailbox with RoundCube again, I see those same folders.. :eek:

    Can anyone of you think why this is happening?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    A new mailbox has just one folder named inbox. Squirrelmail is createing the additional folders automatically while roundcube is not doing this.
     
  3. danielborene

    danielborene New Member

    go to your ../roundcube/config folder
    Edit file main.inc.php

    Look for line
    // automatically create the above listed default folders on login
    $rcmail_config['create_default_folders'] = FALSE;

    change from FALSE to TRUE.

    That should take care of your problem.. it worked for me.
     
  4. autogun

    autogun New Member

    Thanks a bunch!
     
  5. CubAfull

    CubAfull Member

    change password in RoundCube 0.3 and ISPConfig 3

    also you can use the default change password plugin to permit the users change their password.

    go to .../roundcube/plugins/password directory

    # cp config.inc.php.dist config.inc.php
    # vi config.inc.php

    and change this line:
    Code:
    $rcmail_config['password_db_dsn'] = '';
    to
    Code:
    $rcmail_config['password_db_dsn'] = 'mysql://[B]mysql_user[/B]:[B]mysql_password[/B]@localhost/dbispconfig';
    please change mysql_user and mysql_password example: root:rootpassword

    Note: I don't recommend to use the root user!
    you can give permissions to roundcube user for SELECT UPDATE... in the dbispconfig -> mail_user table.

    change this line:
    Code:
    $rcmail_config['password_query'] = 'I don't remember the original code XD';
    to
    Code:
    $rcmail_config['password_query'] = 'UPDATE mail_user SET password = %c WHERE email = %u';
    now open .../roundcube/config/main.inc.php and activate the plugin like this:
    Code:
    // List of active plugins (in plugins/ directory)
    $rcmail_config['plugins'] = array(
    'markasjunk',
    [COLOR="Red"][B]'password',[/B][/COLOR]
    'new_user_dialog',
    'fail2ban'
    );
    now test.... and sorry for my english :D
     
  6. Horfic

    Horfic Member

    This change Password plugin isn't working for ISPConfig 3. Yes you can login with the new password in Roundcube, but you still have the old password for the imap Login etc. because you also have to add the serilazied array with the updated information in the system table for updating the server part.
     
  7. CubAfull

    CubAfull Member

    I test 234234234234 times my installation and everything is working ok with the password plugins.

    If I change the password on roundcube (with this action you are updating the dbispconfig -> mail_user table with the new password!), also have to change in my outlook the pasword for imap and pop3 accounts to login, so... everything is workin fine for me...

    Can you explain in more detail what the problem?, maybe I'm wrong, but so far my users have no problem with my installation :)
     
  8. Horfic

    Horfic Member

    As you maybe knew or not, I created a password changer for Roundcube and ISPConfig 3. And I did exactly the same as the plugin here, but then he told me that I have to make also an entry in the datalog table. So thats what I know.
     
  9. CubAfull

    CubAfull Member

    Hi Horfic,

    Right now I test the installation again... POP3, IMAP... no problem here without updating the datalog table.

    I think this is important if you work with other parameters... in the case of password everything is working fine here.

    Please, till or falco could clarify this doubt ?

    Thank you for your time.
     
  10. arriba

    arriba New Member

    thank you thats works fine for me. im use same versions and it works just perfectly
     
  11. CubAfull

    CubAfull Member

    Great :) good to know...
     
  12. dolmax

    dolmax New Member

    ISPconfig 2

    Hi there,

    I have recently been asked to provide a password tool for roundcube. We're currently using the latest stable ISPconfig 2.2.35 with roundcube 0.3.1. I have tried enabling the standard password plugin using the guide on this thread.

    I can see the password tab on the user pages. When I try to change the password, I get the internal error "Could not change the password".

    Is this script not applicable to ISPconfig 2?
     
    Last edited: Feb 18, 2010
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    This can not work. ISPConfig 2 is a completely different software then ispconfig 3, ispconfig 2 uses linux system users and not virtual users in mysql db like ispconfig 3.
     
  14. dolmax

    dolmax New Member

    Any suggestions, other than moving to version 3? I always thought that version 3 was kind of a beta distro.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    No. ISPCOnfig 3 is a completely new ISP Controlpanel for multi server setups which is alreyd in production use on several thousand servers.

    You can not manage passwords from within roundcube under ispconfig 2 as roundcube has no permissions to edit the /etc/shadow file.
     
  16. Hans

    Hans Moderator Moderator

    RoundCube also creates the default folders for you.
    Please have a look here.
     
  17. Horfic

    Horfic Member

    I don't know what the remote framework in ISPConfig 2 can do, but when it has the mail functions included, than I could port my plugins from ISPConfig 3 to ISPConfig.

    Depends how high the demand is!
     
  18. pallermo

    pallermo New Member

    Super...very useful ;)
     
  19. denni

    denni New Member

    Small correction

    This is what worked for me

    did change password=%c and LIMIT 1
     
    Last edited: Apr 9, 2010
    Yavuz Can likes this.
  20. Coderx

    Coderx New Member

    hello all .
    sorry to bring an old topic up , this is the only thing i could find after hours of googling .
    i installed the latest stable version of roundcube and tried to use the password plugin . i followed everything mentioned here , but still im getting error : Could not save Password " when trying to change a password from roundcube .
    the logfile created in roundcube is as follows :
    Code:
    [21-Mar-2012 14:42:09 -0400]: DB Error: MDB2 Error: not found Query: _doQuery: [Error message: Could not execute statement] [Last executed query: SELECT update_passwd('$1$HcaKaSps$5TpTg9uUbyLJBuuZCrese1', '[email protected]')] [Native code: 1305] [Native message: FUNCTION roundcubemail.update_passwd does not exist]  in /home/kloxo/httpd/webmail/roundcube/program/include/rcube_mdb2.php on line 719 (POST /?_task=settings&_action=plugin.password-save?_task=&_action=)
    [21-Mar-2012 14:42:29] MDB2 Error: not found (-4): _doQuery: [Error message: Could not execute statement]
    [Last executed query: SELECT update_passwd('$1$BFQgj4r3$FSJM2JmGzizR9YJXGSU051', '[email protected]')]
    [Native code: 1305]
    [Native message: FUNCTION roundcubemail.update_passwd does not exist]
    
    [21-Mar-2012 14:42:29 -0400]: DB Error: MDB2 Error: not found Query: _doQuery: [Error message: Could not execute statement] [Last executed query: SELECT update_passwd('$1$BFQgj4r3$FSJM2JmGzizR9YJXGSU051', '[email protected]')] [Native code: 1305] [Native message: FUNCTION roundcubemail.update_passwd does not exist]  in /home/kloxo/httpd/webmail/roundcube/program/include/rcube_mdb2.php on line 719 (POST /?_task=settings&_action=plugin.password-save?_task=&_action=)
    
    and this is the config file for password :
    Code:
    <?php
    
    // Password Plugin options
    // -----------------------
    // A driver to use for password change. Default: "sql".
    // See README file for list of supported driver names.
    $rcmail_config['password_driver'] = 'sql';
    
    // Determine whether current password is required to change password.
    // Default: false.
    $rcmail_config['password_confirm_current'] = true;
    
    // Require the new password to be a certain length.
    // set to blank to allow passwords of any length
    $rcmail_config['password_minimum_length'] = 0;
    
    // Require the new password to contain a letter and punctuation character
    // Change to false to remove this check.
    $rcmail_config['password_require_nonalpha'] = false;
    
    // Enables logging of password changes into logs/password
    $rcmail_config['password_log'] = false;
    
    
    // SQL Driver options
    // ------------------
    // PEAR database DSN for performing the query. By default
    // Roundcube DB settings are used.
    $rcmail_config['password_db_dsn'] = 'mysql://myuser:mypass@localhost/dbispconfig';
    
    // 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'] = 'UPDATE mail_user SET password=%c WHERE email = %u LIMIT 1';
    
    // By default domains in variables are using unicode.
    // Enable this option to use punycoded names
    $rcmail_config['password_idn_ascii'] = false;
    
    // Path for dovecotpw (if not in $PATH)
    // $rcmail_config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw';
    
    // Dovecot method (dovecotpw -s 'method')
    $rcmail_config['password_dovecotpw_method'] = 'CRAM-MD5';
    
    // Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/
    $rcmail_config['password_dovecotpw_with_method'] = false;
    
    // Using a password hash for %n and %q variables.
    // Determine which hashing algorithm should be used to generate
    // the hashed new and current password for using them within the
    // SQL query. Requires PHP's 'hash' extension.
    $rcmail_config['password_hash_algorithm'] = 'sha1';
    
    // You can also decide whether the hash should be provided
    // as hex string or in base64 encoded format.
    $rcmail_config['password_hash_base64'] = false;
    
    
    // Poppassd Driver options
    // -----------------------
    // The host which changes the password
    $rcmail_config['password_pop_host'] = 'localhost';
    
    // TCP port used for poppassd connections
    $rcmail_config['password_pop_port'] = 106;
    
    
    // SASL Driver options
    // -------------------
    // Additional arguments for the saslpasswd2 call
    $rcmail_config['password_saslpasswd_args'] = '';
    
    
    // LDAP and LDAP_SIMPLE Driver options
    // -----------------------------------
    // LDAP server name to connect to. 
    // You can provide one or several hosts in an array in which case the hosts are tried from left to right.
    // Exemple: array('ldap1.exemple.com', 'ldap2.exemple.com');
    // Default: 'localhost'
    $rcmail_config['password_ldap_host'] = 'localhost';
    
    // LDAP server port to connect to
    // Default: '389'
    $rcmail_config['password_ldap_port'] = '389';
    
    // TLS is started after connecting
    // Using TLS for password modification is recommanded.
    // Default: false
    $rcmail_config['password_ldap_starttls'] = false;
    
    // LDAP version
    // Default: '3'
    $rcmail_config['password_ldap_version'] = '3';
    
    // LDAP base name (root directory)
    // Exemple: 'dc=exemple,dc=com'
    $rcmail_config['password_ldap_basedn'] = 'dc=exemple,dc=com';
    
    // LDAP connection method
    // There is two connection method for changing a user's LDAP password.
    // 'user': use user credential (recommanded, require password_confirm_current=true)
    // 'admin': use admin credential (this mode require password_ldap_adminDN and password_ldap_adminPW)
    // Default: 'user'
    $rcmail_config['password_ldap_method'] = 'user';
    
    // LDAP Admin DN
    // Used only in admin connection mode
    // Default: null
    $rcmail_config['password_ldap_adminDN'] = null;
    
    // LDAP Admin Password
    // Used only in admin connection mode
    // Default: null
    $rcmail_config['password_ldap_adminPW'] = null;
    
    // LDAP user DN mask
    // The user's DN is mandatory and as we only have his login,
    // we need to re-create his DN using a mask
    // '%login' will be replaced by the current roundcube user's login
    // '%name' will be replaced by the current roundcube user's name part
    // '%domain' will be replaced by the current roundcube user's domain part
    // '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
    // Exemple: 'uid=%login,ou=people,dc=exemple,dc=com'
    $rcmail_config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';
    
    // LDAP search DN
    // The DN roundcube should bind with to find out user's DN
    // based on his login. Note that you should comment out the default
    // password_ldap_userDN_mask setting for this to take effect.
    // Use this if you cannot specify a general template for user DN with
    // password_ldap_userDN_mask. You need to perform a search based on
    // users login to find his DN instead. A common reason might be that
    // your users are placed under different ou's like engineering or
    // sales which cannot be derived from their login only.
    $rcmail_config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com';
    
    // LDAP search password
    // If password_ldap_searchDN is set, the password to use for
    // binding to search for user's DN. Note that you should comment out the default
    // password_ldap_userDN_mask setting for this to take effect.
    // Warning: Be sure to set approperiate permissions on this file so this password
    // is only accesible to roundcube and don't forget to restrict roundcube's access to
    // your directory as much as possible using ACLs. Should this password be compromised
    // you want to minimize the damage.
    $rcmail_config['password_ldap_searchPW'] = 'secret';
    
    // LDAP search base
    // If password_ldap_searchDN is set, the base to search in using the filter below.
    // Note that you should comment out the default password_ldap_userDN_mask setting
    // for this to take effect.
    $rcmail_config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';
    
    // LDAP search filter
    // If password_ldap_searchDN is set, the filter to use when
    // searching for user's DN. Note that you should comment out the default
    // password_ldap_userDN_mask setting for this to take effect.
    // '%login' will be replaced by the current roundcube user's login
    // '%name' will be replaced by the current roundcube user's name part
    // '%domain' will be replaced by the current roundcube user's domain part
    // '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
    // Example: '(uid=%login)'
    // Example: '(&(objectClass=posixAccount)(uid=%login))'
    $rcmail_config['password_ldap_search_filter'] = '(uid=%login)';
    
    // LDAP password hash type
    // Standard LDAP encryption type which must be one of: crypt,
    // ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, or clear.
    // Please note that most encodage types require external libraries
    // to be included in your PHP installation, see function hashPassword in drivers/ldap.php for more info.
    // Default: 'crypt'
    $rcmail_config['password_ldap_encodage'] = 'crypt';
    
    // LDAP password attribute
    // Name of the ldap's attribute used for storing user password
    // Default: 'userPassword'
    $rcmail_config['password_ldap_pwattr'] = 'userPassword';
    
    // LDAP password force replace
    // Force LDAP replace in cases where ACL allows only replace not read
    // See http://pear.php.net/package/Net_LDAP2/docs/latest/Net_LDAP2/Net_LDAP2_Entry.html#methodreplace
    // Default: true
    $rcmail_config['password_ldap_force_replace'] = true;
    
    // LDAP Password Last Change Date
    // Some places use an attribute to store the date of the last password change
    // The date is meassured in "days since epoch" (an integer value)
    // Whenever the password is changed, the attribute will be updated if set (e.g. shadowLastChange)
    $rcmail_config['password_ldap_lchattr'] = '';
    
    // LDAP Samba password attribute, e.g. sambaNTPassword
    // Name of the LDAP's Samba attribute used for storing user password
    $rcmail_config['password_ldap_samba_pwattr'] = '';
     
    // LDAP Samba Password Last Change Date attribute, e.g. sambaPwdLastSet
    // Some places use an attribute to store the date of the last password change
    // The date is meassured in "seconds since epoch" (an integer value)
    // Whenever the password is changed, the attribute will be updated if set
    $rcmail_config['password_ldap_samba_lchattr'] = '';
    
    
    // DirectAdmin Driver options
    // --------------------------
    // The host which changes the password
    // Use 'ssl://host' instead of 'tcp://host' when running DirectAdmin over SSL.
    // The host can contain the following macros that will be expanded as follows:
    //     %h is replaced with the imap host (from the session info)
    //     %d is replaced with the domain part of the username (if the username is an email)
    $rcmail_config['password_directadmin_host'] = 'tcp://localhost';
    
    // TCP port used for DirectAdmin connections
    $rcmail_config['password_directadmin_port'] = 2222;
    
    
    // vpopmaild Driver options
    // -----------------------
    // The host which changes the password
    $rcmail_config['password_vpopmaild_host'] = 'localhost';
    
    // TCP port used for vpopmaild connections
    $rcmail_config['password_vpopmaild_port'] = 89;
    
    
    // cPanel Driver options
    // --------------------------
    // The cPanel Host name
    $rcmail_config['password_cpanel_host'] = 'host.domain.com';
    
    // The cPanel admin username
    $rcmail_config['password_cpanel_username'] = 'username';
    
    // The cPanel admin password
    $rcmail_config['password_cpanel_password'] = 'password';
    
    // The cPanel port to use
    $rcmail_config['password_cpanel_port'] = 2082;
    
    // Using ssl for cPanel connections?
    $rcmail_config['password_cpanel_ssl'] = true;
    
    // The cPanel theme in use
    $rcmail_config['password_cpanel_theme'] = 'x';
    
    
    // XIMSS (Communigate server) Driver options
    // -----------------------------------------
    // Host name of the Communigate server
    $rcmail_config['password_ximss_host'] = 'mail.example.com';
    
    // XIMSS port on Communigate server
    $rcmail_config['password_ximss_port'] = 11024;
    
    
    // chpasswd Driver options
    // ---------------------
    // Command to use
    $rcmail_config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null';
    
    
    // XMail Driver options
    // ---------------------
    $rcmail_config['xmail_host'] = 'localhost';
    $rcmail_config['xmail_user'] = 'YourXmailControlUser';
    $rcmail_config['xmail_pass'] = 'YourXmailControlPass';
    $rcmail_config['xmail_port'] = 6017;
    
    
    // hMail Driver options
    // -----------------------
    // Remote hMailServer configuration
    // true:  HMailserver is on a remote box (php.ini: com.allow_dcom = true)
    // false: Hmailserver is on same box as PHP
    $rcmail_config['hmailserver_remote_dcom'] = false;
    // Windows credentials
    $rcmail_config['hmailserver_server'] = array(
        'Server' => 'localhost', // hostname or ip address
        'Username' => 'administrator', // windows username
        'Password' => 'password' // windows user password
    );
    
    
    // Virtualmin Driver options
    // -------------------------
    // Username format:
    // 0: username@domain
    // 1: username%domain
    // 2: username.domain
    // 3: domain.username
    // 4: username-domain
    // 5: domain-username
    // 6: username_domain
    // 7: domain_username
    $rcmail_config['password_virtualmin_format'] = 0;
    
    ?>
    and i have centos 5.7 (x86) and kloxo 6.1.12 .
    please someone help me - its been two days that im struggling with this problem :(

    Thanks in advance
     

Share This Page