[Dovecot] Log format question...
Mike Cisar
mlists at starmania.net
Sat Aug 25 19:48:08 EEST 2007
> > auth_username_format = %n
>
> This setting drops the domain part permanently.
>
> Unfortunately you can't tell Dovecot to look up only username from
> these files without dropping the domain..
Thanks Timo. What I don't understand is that given...
%u - username
%n - user part in user at domain, same as %u if there's no domain
%d - domain part in user at domain, empty if user there's no domain
Even if I'm the configuration requires uses %n as the auth username...
shouldn't the domain part still be available to me in %d (and likewise the
full user at domain still in %u). In my mind it doesn't make sense (though it
may make perfect sense to you, knowing how the coding is done) that %u
should be permenantly stripped to match %n and %d is blanked... If I know
that I need to use %n to look up the authentication and somewhere else in
the process I also needed to have just the username part, I would just use
%n again. Obviously the %d part is valid at some point, since I can (though
in my configuration I chose %l instead) use it to specify the correct path
to the passdb and userdb. Since as it stands, in effect %u and %d have one
value in some places and a different one in another.
I guess the easiest way of explaining what I mean is to say... is there any
reason (programming-wise) that the value of %u can't always be left the full
user at domain from the client request, %n always be just the username portion
and %d always the domain portion... from the start of execution of the
client request to the end? Treated as constants rather than modified
partway through the execution? Whether we use %n in one spot doesn't seem
to negate that we might want %u and %d for something somewhere else.
As I type, now that I think of it, I can see that having the value of %u
change to represent the "username as used" as opposed to "username as
submitted by client" could make sense. Maybe just %n and %d should/could be
left constant? I could easily build the "user at domain" that I want in the
logfile entry with "%n@%d"... If I still had the domain in %d.
Cheers,
>>>>> Mike <<<<<
More information about the dovecot
mailing list