[Dovecot] How to seperate pop3 and imap user lookup?
Zhang Huangbin
zhbmaillistonly at gmail.com
Wed Jun 18 10:05:20 EEST 2008
Timo Sirainen wrote:
> On Wed, 2008-06-18 at 13:05 +0800, Zhang Huangbin wrote:
>
>> Hi, all.
>>
>> I have two column in MySQL user table:
>>
>> - enablepop (NOT NULL default '1')
>> - enableimap (NOT NULL default '1')
>>
>> How can i config dovecot to seperate pop user lookup and imap user lookup?
>>
>
> Use %s which expands to IMAP or POP3 in the query. See
> http://wiki.dovecot.org/Variables for list of all variables.
>
>
Hi, Timo.
It works now. Thanks :)
for mysql query(MySQL column: enablepop3, enableimap):
----8<----
user_query = SELECT xxx FROM mailbox WHERE username='%u' AND active='1'
AND enable%Ls='1'
----8<----
for LDAP query(LDAP attr: enablePOP3, enableIMAP):
----8<----
user_filter = (&(mail=%u)(xxx other filter here)(enable%Us=yes))
----8<----
--
Best Regards.
Zhang Huangbin
- Mail Server Solution for Red Hat(R) Enterprise Linux & CentOS 5.x:
http://rhms.googlecode.com/
More information about the dovecot
mailing list