[Dovecot] IMAP proxy configuration

Timo Sirainen tss at iki.fi
Sun Mar 14 02:23:45 EET 2010


On Sat, 2010-03-13 at 21:19 -0300, Leonardo Rodrigues wrote:
> >
> > .., domains.host as host, 'Y' as proxy_maybe, ..
> > from emails, domains where domains.domain = '%d', ..
> >
> > So it's really exactly the same as per-user quota, except you're just
> > returning it per-domain in the query.
> >    
> 
> 
>      but if i simply add that, query will always return nothing when 
> user is not local.
> 
>      where endereco='%u'
> 
>      will make it return an empty resultset when user does not exists 
> locally.

So are you saying that the users table contains only local users, while
some domain table contains all domains and their destination servers?
Then you'll just need to do outer join. Something like:

.., domains.host as host, 'Y' as proxy_maybe, ..
from domains
outer join emails on (username = '%u')
where domain.domain = '%d'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100314/90095658/attachment.bin 


More information about the dovecot mailing list