You can try OpenLDAP password policy overlay: ppolicy.
Reference:
http://www.openldap.org/doc/admin24/ove … figuration
Roundcube will store password last change date in OpenLDAP by default since iRedMail-0.7.0, personally, i think a simple cron job is easier:
- Create a script to query OpenLDAP server, get list of users which didn't change password or is about to expire in 7 days.
- Send notification emails to these users, ask them to change password in time.
If you want to force users to change password after password expired:
- Create a script to query OpenLDAP server, get list of users which didn't change password or is about to expire in 7 days.
- Send notification emails to these users, ask them to change password in time.
- If password expired, store a special value in user objects. For example, enabledService=pwdexpired, or enabledService=forcechpwd, etc.
- Add addition LDAP query (query added special value) in Postfix like MySQL solution you mentioned in post, force them to change password while they trying sending out emails via SMTP service. Users can still fetch mails via POP3/IMAP this way.