PageRenderTime 53ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/install/templates/roundcube/password/config.inc.php

https://github.com/mailserv/mailserv
PHP | 253 lines | 47 code | 55 blank | 151 comment | 0 complexity | cab5ead8d4ee45f584e2dfcf4e2253c5 MD5 | raw file
  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. $rcmail_config['password_driver'] = 'sql';
  7. // Determine whether current password is required to change password.
  8. // Default: false.
  9. $rcmail_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. $rcmail_config['password_minimum_length'] = 0;
  13. // Require the new password to contain a letter and punctuation character
  14. // Change to false to remove this check.
  15. $rcmail_config['password_require_nonalpha'] = false;
  16. // SQL Driver options
  17. // ------------------
  18. // PEAR database DSN for performing the query. By default
  19. // Roundcube DB settings are used.
  20. $rcmail_config['password_db_dsn'] = 'mysql://mailadmin:mailadmin@localhost/mail';
  21. // The SQL query used to change the password.
  22. // The query can contain the following macros that will be expanded as follows:
  23. // %p is replaced with the plaintext new password
  24. // %c is replaced with the crypt version of the new password, MD5 if available
  25. // otherwise DES.
  26. // %D is replaced with the dovecotpw-crypted version of the new password
  27. // %o is replaced with the password before the change
  28. // %n is replaced with the hashed version of the new password
  29. // %q is replaced with the hashed password before the change
  30. // %h is replaced with the imap host (from the session info)
  31. // %u is replaced with the username (from the session info)
  32. // %l is replaced with the local part of the username
  33. // (in case the username is an email address)
  34. // %d is replaced with the domain part of the username
  35. // (in case the username is an email address)
  36. // Escaping of macros is handled by this module.
  37. // Default: "SELECT update_passwd(%c, %u)"
  38. //$rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
  39. $rcmail_config['password_query'] = 'update users set password=%p where email=%u AND password=%o LIMIT 1';
  40. // Path for dovecotpw (if not in $PATH)
  41. // $rcmail_config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw';
  42. // Dovecot method (dovecotpw -s 'method')
  43. $rcmail_config['password_dovecotpw_method'] = 'CRAM-MD5';
  44. // Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/
  45. $rcmail_config['password_dovecotpw_with_method'] = false;
  46. // Using a password hash for %n and %q variables.
  47. // Determine which hashing algorithm should be used to generate
  48. // the hashed new and current password for using them within the
  49. // SQL query. Requires PHP's 'hash' extension.
  50. $rcmail_config['password_hash_algorithm'] = 'sha1';
  51. // You can also decide whether the hash should be provided
  52. // as hex string or in base64 encoded format.
  53. $rcmail_config['password_hash_base64'] = false;
  54. // Poppassd Driver options
  55. // -----------------------
  56. // The host which changes the password
  57. $rcmail_config['password_pop_host'] = 'localhost';
  58. // TCP port used for poppassd connections
  59. $rcmail_config['password_pop_port'] = 106;
  60. // SASL Driver options
  61. // -------------------
  62. // Additional arguments for the saslpasswd2 call
  63. $rcmail_config['password_saslpasswd_args'] = '';
  64. // LDAP and LDAP_SIMPLE Driver options
  65. // -----------------------------------
  66. // LDAP server name to connect to.
  67. // You can provide one or several hosts in an array in which case the hosts are tried from left to right.
  68. // Exemple: array('ldap1.exemple.com', 'ldap2.exemple.com');
  69. // Default: 'localhost'
  70. $rcmail_config['password_ldap_host'] = 'localhost';
  71. // LDAP server port to connect to
  72. // Default: '389'
  73. $rcmail_config['password_ldap_port'] = '389';
  74. // TLS is started after connecting
  75. // Using TLS for password modification is recommanded.
  76. // Default: false
  77. $rcmail_config['password_ldap_starttls'] = false;
  78. // LDAP version
  79. // Default: '3'
  80. $rcmail_config['password_ldap_version'] = '3';
  81. // LDAP base name (root directory)
  82. // Exemple: 'dc=exemple,dc=com'
  83. $rcmail_config['password_ldap_basedn'] = 'dc=exemple,dc=com';
  84. // LDAP connection method
  85. // There is two connection method for changing a user's LDAP password.
  86. // 'user': use user credential (recommanded, require password_confirm_current=true)
  87. // 'admin': use admin credential (this mode require password_ldap_adminDN and password_ldap_adminPW)
  88. // Default: 'user'
  89. $rcmail_config['password_ldap_method'] = 'user';
  90. // LDAP Admin DN
  91. // Used only in admin connection mode
  92. // Default: null
  93. $rcmail_config['password_ldap_adminDN'] = null;
  94. // LDAP Admin Password
  95. // Used only in admin connection mode
  96. // Default: null
  97. $rcmail_config['password_ldap_adminPW'] = null;
  98. // LDAP user DN mask
  99. // The user's DN is mandatory and as we only have his login,
  100. // we need to re-create his DN using a mask
  101. // '%login' will be replaced by the current roundcube user's login
  102. // '%name' will be replaced by the current roundcube user's name part
  103. // '%domain' will be replaced by the current roundcube user's domain part
  104. // Exemple: 'uid=%login,ou=people,dc=exemple,dc=com'
  105. $rcmail_config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';
  106. // LDAP search DN
  107. // The DN roundcube should bind with to find out user's DN
  108. // based on his login. Note that you should comment out the default
  109. // password_ldap_userDN_mask setting for this to take effect.
  110. // Use this if you cannot specify a general template for user DN with
  111. // password_ldap_userDN_mask. You need to perform a search based on
  112. // users login to find his DN instead. A common reason might be that
  113. // your users are placed under different ou's like engineering or
  114. // sales which cannot be derived from their login only.
  115. $rcmail_config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com';
  116. // LDAP search password
  117. // If password_ldap_searchDN is set, the password to use for
  118. // binding to search for user's DN. Note that you should comment out the default
  119. // password_ldap_userDN_mask setting for this to take effect.
  120. // Warning: Be sure to set approperiate permissions on this file so this password
  121. // is only accesible to roundcube and don't forget to restrict roundcube's access to
  122. // your directory as much as possible using ACLs. Should this password be compromised
  123. // you want to minimize the damage.
  124. $rcmail_config['password_ldap_searchPW'] = 'secret';
  125. // LDAP search base
  126. // If password_ldap_searchDN is set, the base to search in using the filter below.
  127. // Note that you should comment out the default password_ldap_userDN_mask setting
  128. // for this to take effect.
  129. $rcmail_config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';
  130. // LDAP search filter
  131. // If password_ldap_searchDN is set, the filter to use when
  132. // searching for user's DN. Note that you should comment out the default
  133. // password_ldap_userDN_mask setting for this to take effect.
  134. // '%login' will be replaced by the current roundcube user's login
  135. // '%name' will be replaced by the current roundcube user's name part
  136. // '%domain' will be replaced by the current roundcube user's domain part
  137. // Example: '(uid=%login)'
  138. // Example: '(&(objectClass=posixAccount)(uid=%login))'
  139. $rcmail_config['password_ldap_search_filter'] = '(uid=%login)';
  140. // LDAP password hash type
  141. // Standard LDAP encryption type which must be one of: crypt,
  142. // ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, or clear.
  143. // Please note that most encodage types require external libraries
  144. // to be included in your PHP installation, see function hashPassword in drivers/ldap.php for more info.
  145. // Default: 'crypt'
  146. $rcmail_config['password_ldap_encodage'] = 'crypt';
  147. // LDAP password attribute
  148. // Name of the ldap's attribute used for storing user password
  149. // Default: 'userPassword'
  150. $rcmail_config['password_ldap_pwattr'] = 'userPassword';
  151. // LDAP password force replace
  152. // Force LDAP replace in cases where ACL allows only replace not read
  153. // See http://pear.php.net/package/Net_LDAP2/docs/latest/Net_LDAP2/Net_LDAP2_Entry.html#methodreplace
  154. // Default: true
  155. $rcmail_config['password_ldap_force_replace'] = true;
  156. // DirectAdmin Driver options
  157. // --------------------------
  158. // The host which changes the password
  159. // Use 'ssl://serverip' instead of 'tcp://serverip' when running DirectAdmin over SSL.
  160. $rcmail_config['password_directadmin_host'] = 'tcp://localhost';
  161. // TCP port used for DirectAdmin connections
  162. $rcmail_config['password_directadmin_port'] = 2222;
  163. // vpopmaild Driver options
  164. // -----------------------
  165. // The host which changes the password
  166. $rcmail_config['password_vpopmaild_host'] = 'localhost';
  167. // TCP port used for vpopmaild connections
  168. $rcmail_config['password_vpopmaild_port'] = 89;
  169. // cPanel Driver options
  170. // --------------------------
  171. // The cPanel Host name
  172. $rcmail_config['password_cpanel_host'] = 'host.domain.com';
  173. // The cPanel admin username
  174. $rcmail_config['password_cpanel_username'] = 'username';
  175. // The cPanel admin password
  176. $rcmail_config['password_cpanel_password'] = 'password';
  177. // The cPanel port to use
  178. $rcmail_config['password_cpanel_port'] = 2082;
  179. // Using ssl for cPanel connections?
  180. $rcmail_config['password_cpanel_ssl'] = true;
  181. // The cPanel theme in use
  182. $rcmail_config['password_cpanel_theme'] = 'x';
  183. // XIMSS (Communigate server) Driver options
  184. // -----------------------------------------
  185. // Host name of the Communigate server
  186. $rcmail_config['password_ximss_host'] = 'mail.example.com';
  187. // XIMSS port on Communigate server
  188. $rcmail_config['password_ximss_port'] = 11024;
  189. // chpasswd Driver options
  190. // ---------------------
  191. // Command to use
  192. $rcmail_config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null';
  193. // XMail Driver options
  194. // ---------------------
  195. $rcmail_config['xmail_host'] = 'localhost';
  196. $rcmail_config['xmail_user'] = 'YourXmailControlUser';
  197. $rcmail_config['xmail_pass'] = 'YourXmailControlPass';
  198. $rcmail_config['xmail_port'] = 6017;