Is it possible to run different authentications for pop3 and imap ? What i need is to give access to some clients to pop3 only and to other to imap only. I'm using postgres as a backend. What i actually need is 2 separate queries for userdb, one to select with "WHERE imap_access = 1" and the other one with "WHERE pop3_access = 1" ( that's just an example ). I'm using 1.1.2 but i plan on upgrading to either 1.1.4 or 1.2.
On Oct 12, 2008, at 9:44 AM, sh1ny wrote:> Is it possible to run different authentications for pop3 and imap ? > What i need is to give access to some clients to pop3 only and to > other to imap only. I'm using postgres as a backend. What i actually > need is 2 separate queries for userdb, one to select with "WHERE > imap_access = 1" and the other one with "WHERE pop3_access = > 1" ( that's just an example ). I'm using 1.1.2 but i plan on > upgrading to either 1.1.4 or 1.2.You could use something like: password_query = \ select .. where .. and '%s' = 'pop3' and pop3_access = 1 \ union select .. where .. and '%s' = 'imap' and imap_access= 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20081012/a1725576/attachment-0002.bin>
Thanks, ill try that :) Timo Sirainen wrote:> On Oct 12, 2008, at 9:44 AM, sh1ny wrote: > >> Is it possible to run different authentications for pop3 and imap ? >> What i need is to give access to some clients to pop3 only and to >> other to imap only. I'm using postgres as a backend. What i actually >> need is 2 separate queries for userdb, one to select with "WHERE >> imap_access = 1" and the other one with "WHERE pop3_access = 1" ( >> that's just an example ). I'm using 1.1.2 but i plan on upgrading to >> either 1.1.4 or 1.2. > > You could use something like: > > password_query = \ > select .. where .. and '%s' = 'pop3' and pop3_access = 1 \ > union select .. where .. and '%s' = 'imap' and imap_access= 1 >