0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-20 03:36:20 +02:00

Accepts incoming emails for active mailboxes, even if password is expired

This commit is contained in:
Damien Martins 2018-11-27 10:36:11 +08:00
parent 9e4d64ef78
commit 78a461f07e

View File

@ -37,7 +37,7 @@ All my tests are performed using $config['password_algorithm'] = 'md5-crypt';
Edit dovecot-mysql.conf file, and replace the user_query (and only this one) by this query: Edit dovecot-mysql.conf file, and replace the user_query (and only this one) by this query:
user_query = SELECT concat('/var/vmail/', m.maildir) as home, concat('maildir:/var/vmail/', m.maildir) as mail, 20001 AS uid, 20001 AS gid, concat('dirsize:storage=', m.quota) AS quota, m.domain FROM mailbox m ,domain d WHERE d.domain = m.domain and m.username = 'tutu@eyetech-software.com' AND m.active = '1' and (m.password_expiry > now() or d.password_expiry = 0) password_query = SELECT username as user, password, concat('/var/vmail/', maildir) as userdb_var, concat('maildir:/var/vmail/', maildir) as userdb_mail, 20001 as userdb_uid, 20001 as userdb_gid, m.domain FROM mailbox m, domain d where d.domain = m.domain and m.username = '%u' AND m.active = '1' AND (m.pw_expires_on > now() or d.password_expiration_value = 0)
Of course you may require to adapt the uid, gid, maildir and table to your setup Of course you may require to adapt the uid, gid, maildir and table to your setup