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? Thanks very much. -- Best Regards. Zhang Huangbin - Mail Server Solution for Red Hat(R) Enterprise Linux & CentOS 5.x: http://rhms.googlecode.com/
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. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080618/eea93bac/attachment-0002.bin>
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. > >Got it. Thanks Timo. :) -- Best Regards. Zhang Huangbin - Mail Server Solution for Red Hat(R) Enterprise Linux & CentOS 5.x: http://rhms.googlecode.com/
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/