[Dovecot] Master User Features I'd like to see

Bradley Giesbrecht bradley.giesbrecht at gmail.com
Mon Aug 16 03:07:50 EEST 2010


On Aug 15, 2010, at 4:56 PM, Marc Perkel wrote:

>
>
> On 8/15/2010 3:06 PM, Timo Sirainen wrote:
>> On 15.8.2010, at 22.46, Marc Perkel wrote:
>>
>>> passdb {
>>>  driver = sql
>>>  args = /etc/dovecot/dovecot-sql-master.conf.ext
>>>  master = yes
>>>  pass = yes
>>> }
>> ..
>>> I'm assuming that the masteruser and masterpass is passed to the  
>>> master passdb and when doing so the variable %u is the master  
>>> user.  I assume that %n and %d also represent the name and domain  
>>> part of the master user.
>> Yes.
>>
>>> What I need is to also be able to have variables for the loginuser  
>>> passed to the master user query. Something like %lu, %ln, and %ld  
>>> perhaps. That way with MySQL tricks I might be able to see if the  
>>> master user is master for that particular login user. That way I  
>>> can give domain owners or owners of multiple domains the ability  
>>> to manage the email accounts within their scope of permission.
>>
>> These are available in v2.0:
>>
>> %{login_user}
>> %{login_username}
>> %{login_domain}
>>
>> I guess they should be added to wiki..
>
> Further testing shows  %{login_domain} returns an empty string.

What was your test? Mysql query log?

Did you add them as '%{login_user}' or '%login_user'?

ChangeLog has:

	* src/auth/auth-request.c:
	auth: Added %{login_user}, %{login_username} and %{login_domain}
	variables that are set for master logins.
	[5ae4a5c14f5b]

// Brad


More information about the dovecot mailing list