WARNING: This is still a working in progress draft document, do NOT apply it.
Please open Dovecot config file /etc/dovecot/dovecot-mysql.conf
(Linux/OpenBSD) or /usr/local/etc/dovecot/dovecot-mysql.conf
(FreeBSD), find
below line:
# Part of file: /etc/dovecot/dovecot-mysql.conf
password_query = SELECT password FROM mailbox WHERE username='%u' AND active='1'
Add additional query AND enable%Ls%Lc=1
like below:
# Part of file: /etc/dovecot/dovecot-mysql.conf
password_query = SELECT password FROM mailbox WHERE username='%u' AND enable%Ls%Lc=1 AND active='1'
Save your change and restart Dovecot service.
Please open Dovecot config file /etc/dovecot/dovecot-pgsql.conf
(Linux/OpenBSD) or /usr/local/etc/dovecot/dovecot-pgsql.conf
(FreeBSD), find
below line:
# Part of file: /etc/dovecot/dovecot-pgsql.conf
password_query = SELECT password FROM mailbox WHERE username='%u' AND active='1'
Add additional query like below:
# Part of file: /etc/dovecot/dovecot-pgsql.conf
password_query = SELECT password FROM mailbox WHERE username='%u' AND enable%Ls%Lc=1 AND active='1'
Save your change and restart Dovecot service.
Document published under a CC BY-ND 3.0 license. If you found something wrong, please do contact us to fix it.