Aleksander Machniak
2013-07-09 e89d8f1fec3743e9ee1018d3bab1a375ab79cebf
commit | author | age
48e9c1 1 <?php
T 2
3 // Password Plugin options
4 // -----------------------
5 // A driver to use for password change. Default: "sql".
6 // See README file for list of supported driver names.
7 $rcmail_config['password_driver'] = 'sql';
8
9 // Determine whether current password is required to change password.
10 // Default: false.
11 $rcmail_config['password_confirm_current'] = true;
12
13 // Require the new password to be a certain length.
14 // set to blank to allow passwords of any length
15 $rcmail_config['password_minimum_length'] = 0;
16
17 // Require the new password to contain a letter and punctuation character
18 // Change to false to remove this check.
19 $rcmail_config['password_require_nonalpha'] = false;
20
21 // Enables logging of password changes into logs/password
22 $rcmail_config['password_log'] = false;
23
24 // Comma-separated list of login exceptions for which password change
25 // will be not available (no Password tab in Settings)
26 $rcmail_config['password_login_exceptions'] = null;
27
98128f 28 // Array of hosts that support password changing. Default is NULL.
AM 29 // Listed hosts will feature a Password option in Settings; others will not.
30 // Example:
31 //$rcmail_config['password_hosts'] = array('mail.example.com', 'mail2.example.org');
32 $rcmail_config['password_hosts'] = null;
33
6db9f8 34 // Enables saving the new password even if it matches the old password. Useful
S 35 // for upgrading the stored passwords after the encryption scheme has changed.
36 $rcmail_config['password_force_save'] = false;
37
48e9c1 38
T 39 // SQL Driver options
40 // ------------------
41 // PEAR database DSN for performing the query. By default
42 // Roundcube DB settings are used.
43 $rcmail_config['password_db_dsn'] = '';
44
45 // The SQL query used to change the password.
46 // The query can contain the following macros that will be expanded as follows:
47 //      %p is replaced with the plaintext new password
48 //      %c is replaced with the crypt version of the new password, MD5 if available
5ba07a 49 //         otherwise DES. More hash function can be enabled using the password_crypt_hash 
D 50 //         configuration parameter.
48e9c1 51 //      %D is replaced with the dovecotpw-crypted version of the new password
T 52 //      %o is replaced with the password before the change
53 //      %n is replaced with the hashed version of the new password
54 //      %q is replaced with the hashed password before the change
55 //      %h is replaced with the imap host (from the session info)
56 //      %u is replaced with the username (from the session info)
57 //      %l is replaced with the local part of the username
58 //         (in case the username is an email address)
59 //      %d is replaced with the domain part of the username
60 //         (in case the username is an email address)
61 // Escaping of macros is handled by this module.
62 // Default: "SELECT update_passwd(%c, %u)"
63 $rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
64
5ba07a 65 // By default the crypt() function which is used to create the '%c' 
D 66 // parameter uses the md5 algorithm. To use different algorithms 
67 // you can choose between: des, md5, blowfish, sha256, sha512.
68 // Before using other hash functions than des or md5 please make sure
69 // your operating system supports the other hash functions.
70 $rcmail_config['password_crypt_hash'] = 'md5';
71
48e9c1 72 // By default domains in variables are using unicode.
T 73 // Enable this option to use punycoded names
74 $rcmail_config['password_idn_ascii'] = false;
75
76 // Path for dovecotpw (if not in $PATH)
77 // $rcmail_config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw';
78
79 // Dovecot method (dovecotpw -s 'method')
80 $rcmail_config['password_dovecotpw_method'] = 'CRAM-MD5';
81
82 // Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/
83 $rcmail_config['password_dovecotpw_with_method'] = false;
84
85 // Using a password hash for %n and %q variables.
86 // Determine which hashing algorithm should be used to generate
87 // the hashed new and current password for using them within the
88 // SQL query. Requires PHP's 'hash' extension.
89 $rcmail_config['password_hash_algorithm'] = 'sha1';
90
91 // You can also decide whether the hash should be provided
92 // as hex string or in base64 encoded format.
93 $rcmail_config['password_hash_base64'] = false;
94
95
96 // Poppassd Driver options
97 // -----------------------
98 // The host which changes the password
99 $rcmail_config['password_pop_host'] = 'localhost';
100
101 // TCP port used for poppassd connections
102 $rcmail_config['password_pop_port'] = 106;
103
104
105 // SASL Driver options
106 // -------------------
107 // Additional arguments for the saslpasswd2 call
108 $rcmail_config['password_saslpasswd_args'] = '';
109
110
111 // LDAP and LDAP_SIMPLE Driver options
112 // -----------------------------------
113 // LDAP server name to connect to. 
114 // You can provide one or several hosts in an array in which case the hosts are tried from left to right.
115 // Exemple: array('ldap1.exemple.com', 'ldap2.exemple.com');
116 // Default: 'localhost'
117 $rcmail_config['password_ldap_host'] = 'localhost';
118
119 // LDAP server port to connect to
120 // Default: '389'
121 $rcmail_config['password_ldap_port'] = '389';
122
123 // TLS is started after connecting
124 // Using TLS for password modification is recommanded.
125 // Default: false
126 $rcmail_config['password_ldap_starttls'] = false;
127
128 // LDAP version
129 // Default: '3'
130 $rcmail_config['password_ldap_version'] = '3';
131
132 // LDAP base name (root directory)
133 // Exemple: 'dc=exemple,dc=com'
134 $rcmail_config['password_ldap_basedn'] = 'dc=exemple,dc=com';
135
136 // LDAP connection method
137 // There is two connection method for changing a user's LDAP password.
138 // 'user': use user credential (recommanded, require password_confirm_current=true)
139 // 'admin': use admin credential (this mode require password_ldap_adminDN and password_ldap_adminPW)
140 // Default: 'user'
141 $rcmail_config['password_ldap_method'] = 'user';
142
143 // LDAP Admin DN
144 // Used only in admin connection mode
145 // Default: null
146 $rcmail_config['password_ldap_adminDN'] = null;
147
148 // LDAP Admin Password
149 // Used only in admin connection mode
150 // Default: null
151 $rcmail_config['password_ldap_adminPW'] = null;
152
153 // LDAP user DN mask
154 // The user's DN is mandatory and as we only have his login,
155 // we need to re-create his DN using a mask
156 // '%login' will be replaced by the current roundcube user's login
157 // '%name' will be replaced by the current roundcube user's name part
158 // '%domain' will be replaced by the current roundcube user's domain part
159 // '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
160 // Exemple: 'uid=%login,ou=people,dc=exemple,dc=com'
161 $rcmail_config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';
162
163 // LDAP search DN
164 // The DN roundcube should bind with to find out user's DN
165 // based on his login. Note that you should comment out the default
166 // password_ldap_userDN_mask setting for this to take effect.
167 // Use this if you cannot specify a general template for user DN with
168 // password_ldap_userDN_mask. You need to perform a search based on
169 // users login to find his DN instead. A common reason might be that
170 // your users are placed under different ou's like engineering or
171 // sales which cannot be derived from their login only.
172 $rcmail_config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com';
173
174 // LDAP search password
175 // If password_ldap_searchDN is set, the password to use for
176 // binding to search for user's DN. Note that you should comment out the default
177 // password_ldap_userDN_mask setting for this to take effect.
178 // Warning: Be sure to set approperiate permissions on this file so this password
179 // is only accesible to roundcube and don't forget to restrict roundcube's access to
180 // your directory as much as possible using ACLs. Should this password be compromised
181 // you want to minimize the damage.
182 $rcmail_config['password_ldap_searchPW'] = 'secret';
183
184 // LDAP search base
185 // If password_ldap_searchDN is set, the base to search in using the filter below.
186 // Note that you should comment out the default password_ldap_userDN_mask setting
187 // for this to take effect.
188 $rcmail_config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';
189
190 // LDAP search filter
191 // If password_ldap_searchDN is set, the filter to use when
192 // searching for user's DN. Note that you should comment out the default
193 // password_ldap_userDN_mask setting for this to take effect.
194 // '%login' will be replaced by the current roundcube user's login
195 // '%name' will be replaced by the current roundcube user's name part
196 // '%domain' will be replaced by the current roundcube user's domain part
197 // '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
198 // Example: '(uid=%login)'
199 // Example: '(&(objectClass=posixAccount)(uid=%login))'
200 $rcmail_config['password_ldap_search_filter'] = '(uid=%login)';
201
202 // LDAP password hash type
203 // Standard LDAP encryption type which must be one of: crypt,
204 // ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, or clear.
205 // Please note that most encodage types require external libraries
206 // to be included in your PHP installation, see function hashPassword in drivers/ldap.php for more info.
207 // Default: 'crypt'
208 $rcmail_config['password_ldap_encodage'] = 'crypt';
209
210 // LDAP password attribute
211 // Name of the ldap's attribute used for storing user password
212 // Default: 'userPassword'
213 $rcmail_config['password_ldap_pwattr'] = 'userPassword';
214
215 // LDAP password force replace
216 // Force LDAP replace in cases where ACL allows only replace not read
217 // See http://pear.php.net/package/Net_LDAP2/docs/latest/Net_LDAP2/Net_LDAP2_Entry.html#methodreplace
218 // Default: true
219 $rcmail_config['password_ldap_force_replace'] = true;
220
221 // LDAP Password Last Change Date
222 // Some places use an attribute to store the date of the last password change
223 // The date is meassured in "days since epoch" (an integer value)
224 // Whenever the password is changed, the attribute will be updated if set (e.g. shadowLastChange)
225 $rcmail_config['password_ldap_lchattr'] = '';
226
227 // LDAP Samba password attribute, e.g. sambaNTPassword
228 // Name of the LDAP's Samba attribute used for storing user password
229 $rcmail_config['password_ldap_samba_pwattr'] = '';
230  
231 // LDAP Samba Password Last Change Date attribute, e.g. sambaPwdLastSet
232 // Some places use an attribute to store the date of the last password change
233 // The date is meassured in "seconds since epoch" (an integer value)
234 // Whenever the password is changed, the attribute will be updated if set
235 $rcmail_config['password_ldap_samba_lchattr'] = '';
236
237
238 // DirectAdmin Driver options
239 // --------------------------
240 // The host which changes the password
241 // Use 'ssl://host' instead of 'tcp://host' when running DirectAdmin over SSL.
242 // The host can contain the following macros that will be expanded as follows:
243 //     %h is replaced with the imap host (from the session info)
244 //     %d is replaced with the domain part of the username (if the username is an email)
245 $rcmail_config['password_directadmin_host'] = 'tcp://localhost';
246
247 // TCP port used for DirectAdmin connections
248 $rcmail_config['password_directadmin_port'] = 2222;
249
250
251 // vpopmaild Driver options
252 // -----------------------
253 // The host which changes the password
254 $rcmail_config['password_vpopmaild_host'] = 'localhost';
255
256 // TCP port used for vpopmaild connections
257 $rcmail_config['password_vpopmaild_port'] = 89;
258
259
260 // cPanel Driver options
261 // --------------------------
262 // The cPanel Host name
263 $rcmail_config['password_cpanel_host'] = 'host.domain.com';
264
265 // The cPanel admin username
266 $rcmail_config['password_cpanel_username'] = 'username';
267
268 // The cPanel admin password
269 $rcmail_config['password_cpanel_password'] = 'password';
270
271 // The cPanel port to use
30ff85 272 $rcmail_config['password_cpanel_port'] = 2087;
48e9c1 273
T 274
275 // XIMSS (Communigate server) Driver options
276 // -----------------------------------------
277 // Host name of the Communigate server
278 $rcmail_config['password_ximss_host'] = 'mail.example.com';
279
280 // XIMSS port on Communigate server
281 $rcmail_config['password_ximss_port'] = 11024;
282
283
284 // chpasswd Driver options
285 // ---------------------
286 // Command to use
287 $rcmail_config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null';
288
289
290 // XMail Driver options
291 // ---------------------
292 $rcmail_config['xmail_host'] = 'localhost';
293 $rcmail_config['xmail_user'] = 'YourXmailControlUser';
294 $rcmail_config['xmail_pass'] = 'YourXmailControlPass';
295 $rcmail_config['xmail_port'] = 6017;
296
297
298 // hMail Driver options
299 // -----------------------
300 // Remote hMailServer configuration
301 // true:  HMailserver is on a remote box (php.ini: com.allow_dcom = true)
302 // false: Hmailserver is on same box as PHP
303 $rcmail_config['hmailserver_remote_dcom'] = false;
304 // Windows credentials
305 $rcmail_config['hmailserver_server'] = array(
306     'Server' => 'localhost', // hostname or ip address
307     'Username' => 'administrator', // windows username
308     'Password' => 'password' // windows user password
309 );
310
311
312 // Virtualmin Driver options
313 // -------------------------
314 // Username format:
315 // 0: username@domain
316 // 1: username%domain
317 // 2: username.domain
318 // 3: domain.username
319 // 4: username-domain
320 // 5: domain-username
321 // 6: username_domain
322 // 7: domain_username
6ffe0b 323 // 8: username@domain; mbox.username
G 324 $rcmail_config['password_virtualmin_format'] = 8;
48e9c1 325
T 326
327 // pw_usermod Driver options
328 // --------------------------
329 // Use comma delimited exlist to disable password change for users
330 // Add the following line to visudo to tighten security:
331 // www  ALL=NOPASSWORD: /usr/sbin/pw
332 $rcmail_config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n';
333
334
335 // DBMail Driver options
336 // -------------------
337 // Additional arguments for the dbmail-users call
338 $rcmail_config['password_dbmail_args'] = '-p sha512';
339
340
341 // Expect Driver options
342 // ---------------------
343 // Location of expect binary
344 $rcmail_config['password_expect_bin'] = '/usr/bin/expect';
345
346 // Location of expect script (see helpers/passwd-expect)
347 $rcmail_config['password_expect_script'] = '';
348
349 // Arguments for the expect script. See the helpers/passwd-expect file for details.
350 // This is probably a good starting default:
351 //   -telent -host localhost -output /tmp/passwd.log -log /tmp/passwd.log
352 $rcmail_config['password_expect_params'] = '';
353
354
355 // smb Driver options
356 // ---------------------
357 // Samba host (default: localhost)
e0d466 358 // Supported replacement variables:
AM 359 // %n - hostname ($_SERVER['SERVER_NAME'])
360 // %t - hostname without the first part
361 // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
48e9c1 362 $rcmail_config['password_smb_host'] = 'localhost';
T 363 // Location of smbpasswd binary
364 $rcmail_config['password_smb_cmd'] = '/usr/bin/smbpasswd';