[Dovecot] v2.0 configuration parsing

Rainer Frey (Inxmail GmbH) rainer.frey at inxmail.de
Tue Aug 11 17:03:07 EEST 2009


On Tuesday 11 August 2009 15:32:42 Matthijs Kooijman wrote:
> > > 1) User logs in to imap from 192.168.0.1. What is foo's value?
> > >
> > > protocol imap {
> > >   remote_ip 192.168.0.0/16 {
> > >     foo = foo
> > >   }
> > > }
> > > remote_ip 192.168.0.0/24 {
> > >   foo = bar
> > > }
> >
> > This one is easy. It should be foo in any case :-)
>
> Why? /24 is more specific than /16, but protocol imap is more specific than
> (implicit) protocol any. I assume this is why Timo included this example.

You are right, and I left out half of my thoughts. I think there should be 
only a coarse grained concept of "more specific rules" - e.g. a protocol 
section is more specific than general config, and a local or remote IP 
restriction is more specific than a protocol section. I think that the values 
of these context selectors should not define "more specific". Within one of 
these levels, either conflicting settings should be invalid, or maybe better 
yet, a "last wins" rule should apply.

> Gr.
>
> Matthijs

Rainer


More information about the dovecot mailing list