You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

104 lines
4.5 KiB

  1. <?php
  2. // Password Plugin options
  3. // -----------------------
  4. // A driver to use for password change. Default: "sql".
  5. // See README file for list of supported driver names.
  6. $config['password_driver'] = 'sql';
  7. // Determine whether current password is required to change password.
  8. // Default: false.
  9. $config['password_confirm_current'] = true;
  10. // Require the new password to be a certain length.
  11. // set to blank to allow passwords of any length
  12. $config['password_minimum_length'] = 10;
  13. // Require the new password to contain a letter and punctuation character
  14. // Change to false to remove this check.
  15. $config['password_require_nonalpha'] = false;
  16. // Enables logging of password changes into logs/password
  17. $config['password_log'] = false;
  18. // Comma-separated list of login exceptions for which password change
  19. // will be not available (no Password tab in Settings)
  20. $config['password_login_exceptions'] = null;
  21. // Array of hosts that support password changing. Default is NULL.
  22. // Listed hosts will feature a Password option in Settings; others will not.
  23. // Example:
  24. //$config['password_hosts'] = array('mail.example.com', 'mail2.example.org');
  25. $config['password_hosts'] = null;
  26. // Enables saving the new password even if it matches the old password. Useful
  27. // for upgrading the stored passwords after the encryption scheme has changed.
  28. $config['password_force_save'] = true;
  29. // Enables forcing new users to change their password at their first login.
  30. $config['password_force_new_user'] = false;
  31. // SQL Driver options
  32. // ------------------
  33. // PEAR database DSN for performing the query. By default
  34. // Roundcube DB settings are used.
  35. $config['password_db_dsn'] = 'mysql://mailuser:{{ispmail_mysql_mailuser_password}}@127.0.0.1/mailserver';
  36. // The SQL query used to change the password.
  37. // The query can contain the following macros that will be expanded as follows:
  38. // %p is replaced with the plaintext new password
  39. // %c is replaced with the crypt version of the new password, MD5 if available
  40. // otherwise DES. More hash function can be enabled using the password_crypt_hash
  41. // configuration parameter.
  42. // %D is replaced with the dovecotpw-crypted version of the new password
  43. // %o is replaced with the password before the change
  44. // %n is replaced with the hashed version of the new password
  45. // %q is replaced with the hashed password before the change
  46. // %h is replaced with the imap host (from the session info)
  47. // %u is replaced with the username (from the session info)
  48. // %l is replaced with the local part of the username
  49. // (in case the username is an email address)
  50. // %d is replaced with the domain part of the username
  51. // (in case the username is an email address)
  52. // Escaping of macros is handled by this module.
  53. // Default: "SELECT update_passwd(%c, %u)"
  54. //$config['password_query'] = 'SELECT update_passwd(%D, %u)';
  55. $config['password_query'] = "UPDATE virtual_users SET password=CONCAT('{SHA256-CRYPT}', ENCRYPT (%p, CONCAT('$5$', SUBSTRING(SHA(RAND()), -16)))) WHERE email=%u;";
  56. // By default the crypt() function which is used to create the '%c'
  57. // parameter uses the md5 algorithm. To use different algorithms
  58. // you can choose between: des, md5, blowfish, sha256, sha512.
  59. // Before using other hash functions than des or md5 please make sure
  60. // your operating system supports the other hash functions.
  61. //$config['password_crypt_hash'] = 'sha256';
  62. // By default domains in variables are using unicode.
  63. // Enable this option to use punycoded names
  64. $config['password_idn_ascii'] = false;
  65. // Path for dovecotpw (if not in $PATH)
  66. //$config['password_dovecotpw'] = '/usr/sbin/dovecot pw';
  67. // Dovecot method (dovecotpw -s 'method')
  68. //$config['password_dovecotpw_method'] = 'SHA256-CRYPT';
  69. // Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/
  70. //$config['password_dovecotpw_with_method'] = true;
  71. // Using a password hash for %n and %q variables.
  72. // Determine which hashing algorithm should be used to generate
  73. // the hashed new and current password for using them within the
  74. // SQL query. Requires PHP's 'hash' extension.
  75. //$config['password_hash_algorithm'] = 'sha1';
  76. // You can also decide whether the hash should be provided
  77. // as hex string or in base64 encoded format.
  78. //$config['password_hash_base64'] = false;
  79. // Iteration count parameter for Blowfish-based hashing algo.
  80. // It must be between 4 and 31. Default: 12.
  81. // Be aware, the higher the value, the longer it takes to generate the password hashes.
  82. //$config['password_blowfish_cost'] = 12;