Sync parameters in force.user.to.change.password.html.

This commit is contained in:
Zhang Huangbin 2019-06-18 13:35:57 +08:00
parent 4acfe2ad34
commit 57c8269659
2 changed files with 26 additions and 12 deletions

View File

@ -36,18 +36,25 @@ plugins = [..., 'sql_force_change_password']
plugins = [..., 'ldap_force_change_password']
```
There're two optional settings you can set in `/opt/iredapd/settings.py`:
There're three optional settings pre-defined in `/opt/iredapd/libs/default_settings.py`,
if you want to change them, please copy the parameter names and set proper values
in `/opt/iredapd/settings.py`:
```
# User has to change password in certain days. Default is 90 days.
# Force to change password in certain days.
CHANGE_PASSWORD_DAYS = 90
# MTA will reject user's smtp session with below message. You'd better describe
# why user's email was rejected and guide user to change password.
CHANGE_PASSWORD_MESSAGE = 'Please change your password in webmail before sending email: https://xxx/webmail/'
# Reject reason.
# It's recommended to add URL of the web applications which user can login
# to change password in this message. e.g. Roundcube webmail, iRedAdmin-Pro.
CHANGE_PASSWORD_MESSAGE = 'Password expired or never changed, please change your password in webmail before sending email'
# Allow certain users or domains to never change password.
# sample values: ['user@example.com', 'domain.com']
CHANGE_PASSWORD_NEVER_EXPIRE_USERS = []
```
Then restart iRedAPD service.
Restarting `iredapd` service is required after changed `/opt/iredapd/settings.py`.
## Roundcube plugin: `force_password_change`

View File

@ -54,16 +54,23 @@ plugins = [..., 'sql_force_change_password']
plugins = [..., 'ldap_force_change_password']
</code></pre>
<p>There're two optional settings you can set in <code>/opt/iredapd/settings.py</code>:</p>
<pre><code># User has to change password in certain days. Default is 90 days.
<p>There're three optional settings pre-defined in <code>/opt/iredapd/libs/default_settings.py</code>,
if you want to change them, please copy the parameter names and set proper values
in <code>/opt/iredapd/settings.py</code>:</p>
<pre><code># Force to change password in certain days.
CHANGE_PASSWORD_DAYS = 90
# MTA will reject user's smtp session with below message. You'd better describe
# why user's email was rejected and guide user to change password.
CHANGE_PASSWORD_MESSAGE = 'Please change your password in webmail before sending email: https://xxx/webmail/'
# Reject reason.
# It's recommended to add URL of the web applications which user can login
# to change password in this message. e.g. Roundcube webmail, iRedAdmin-Pro.
CHANGE_PASSWORD_MESSAGE = 'Password expired or never changed, please change your password in webmail before sending email'
# Allow certain users or domains to never change password.
# sample values: ['user@example.com', 'domain.com']
CHANGE_PASSWORD_NEVER_EXPIRE_USERS = []
</code></pre>
<p>Then restart iRedAPD service.</p>
<p>Restarting <code>iredapd</code> service is required after changed <code>/opt/iredapd/settings.py</code>.</p>
<h2 id="roundcube-plugin-force_password_change">Roundcube plugin: <code>force_password_change</code></h2>
<p>There's a third-party Roundcube plugin can force user to change password.
<a href="https://bitbucket.org/wainlake/force_password_change">https://bitbucket.org/wainlake/force_password_change</a></p>