<li><ahref="#fixed-not-apply-service-restriction-in-dovecot-sql-query-file-while-acting-as-sasl-server">Fixed: Not apply service restriction in Dovecot SQL query file while acting as SASL server</a></li>
<li><ahref="#fixed-not-apply-service-restriction-in-dovecot-sql-query-file-while-acting-as-sasl-server_1">Fixed: Not apply service restriction in Dovecot SQL query file while acting as SASL server</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<p>WARNING: This is still a working in progress draft document, do <strong>NOT</strong> apply it.</p>
<h3id="fixed-not-apply-service-restriction-in-dovecot-sql-query-file-while-acting-as-sasl-server">Fixed: Not apply service restriction in Dovecot SQL query file while acting as SASL server</h3>
<p>Please open Dovecot config file <code>/etc/dovecot/dovecot-mysql.conf</code>
(Linux/OpenBSD) or <code>/usr/local/etc/dovecot/dovecot-mysql.conf</code> (FreeBSD), find
below line:</p>
<pre><code># Part of file: /etc/dovecot/dovecot-mysql.conf
password_query = SELECT password FROM mailbox WHERE username='%u' AND active='1'
</code></pre>
<p>Add additional query <code>AND enable%Ls%Lc=1</code> like below:</p>
<pre><code># 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'
</code></pre>
<p>Save your change and restart Dovecot service.</p>
<h3id="fixed-not-apply-service-restriction-in-dovecot-sql-query-file-while-acting-as-sasl-server_1">Fixed: Not apply service restriction in Dovecot SQL query file while acting as SASL server</h3>
<p>Please open Dovecot config file <code>/etc/dovecot/dovecot-pgsql.conf</code>
(Linux/OpenBSD) or <code>/usr/local/etc/dovecot/dovecot-pgsql.conf</code> (FreeBSD), find
below line:</p>
<pre><code># Part of file: /etc/dovecot/dovecot-pgsql.conf
password_query = SELECT password FROM mailbox WHERE username='%u' AND active='1'
</code></pre>
<p>Add additional query like below:</p>
<pre><code># 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'
</code></pre>
<p>Save your change and restart Dovecot service.</p><pstyle="text-align: center; color: grey;">Document published under a <ahref="http://creativecommons.org/licenses/by-nd/3.0/us/"target="_blank">CC BY-ND 3.0</a> license. If you found something wrong, please do <ahref="http://www.iredmail.org/contact.html">contact us</a> to fix it.<!-- Google Analytics -->
<scripttype="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");