[Dovecot] IP based virtual users: stripping login domain?

Alan Ferrency alan at pair.com
Mon Sep 17 18:59:28 EEST 2007


> I implemented this to v1.1:

<snip>

Great, thanks!

Yes, my initial digging did lead me to conclude it would be a pain to
add new settings into the passdb block. But the format you provided is
equivalent, which works fine for me.

Curiously, what happens when you specify this:

auth_username_format=%n
passdb passwd-file {
  args = username_format=%u /etc/imap.passwd
}

In my attempt to implement something like this, I didn't find any
straightforward way to have "username_format=%u" use the original
username, only the auth_username_format.

Also:
passdb passwd-file {
  args = username_format=%u /etc/imap.passwd.%d
}

Does this provide the full username, or does the %d still truncate
at the '@'?

Although I'm curious how you implemented these points, it's easy to do
the right thing in both cases once you know how it works, so it's not a
big problem either way.

Thanks.

Alan Ferrency
pair Networks, Inc.
alan at pair.com




On Sat, 15 Sep 2007, Timo Sirainen wrote:

> On Fri, 2007-09-14 at 13:33 -0400, Alan Ferrency wrote:
> > An example configuration would look like this:
> >
> > passdb passwd-file {
> >     args = /path/%l.passwd
> >     username_format = %n
> > }
>
> That would be nice configuration, but currently it's too difficult to
> add more settings inside passdb blocks.
>
> I implemented this to v1.1:
>
> passdb passwd-file {
>   args = username_format=%n /etc/imap.passwd
> }
> userdb passwd-file {
>   args = username_format=%n /etc/imap.passwd
> }
>
>


More information about the dovecot mailing list