61
61
=mail=maildir:/var/vmail/%d/%n/Maildir
62
62
---%<-------------------------------------------------------------------------
64
(This file was created from the wiki on 2012-04-23 04:42)
64
Attribute templates (v2.1)
65
--------------------------
67
With v2.1+ you can use more than one LDAP attribute in a variable. The new
68
syntax is also easier to understand. For example:
70
---%<-------------------------------------------------------------------------
72
=quota_rule=*:bytes=%{ldap:quotaBytes}, \
73
=home=/home/%{ldap:userDomain}/%{ldap:userName}
74
---%<-------------------------------------------------------------------------
76
It's also possible to give default values to nonexistent attributes in v2.1.11+
77
by using e.g.'%{ldap:userDomain:example.com} ' where if userDomain attribute
78
doesn't exist, example.com is used instead.
80
Subqueries and pointers (v2.2)
81
------------------------------
83
LDAP values can now have DN pointers to other entries that are queried.
86
---%<-------------------------------------------------------------------------
89
@mail=%{ldap:mailDN}, \
90
=uid=%{ldap:uidNumber@mail}, \
91
=gid=%{ldap:gidNumber@mail}, \
92
=home=%{ldap:rootPath@mail}/%d/%n
93
---%<-------------------------------------------------------------------------
95
This will do a regular lookup first. Then does another lookup with DN taken
96
from mailDN's value. The *@mail attributes are assigned from the second
99
---%<-------------------------------------------------------------------------
102
=home=%{ldap_ptr:activePath}, \
103
!primaryPath, !secondaryPath
104
---%<-------------------------------------------------------------------------
106
The activePath's value can be either "primaryPath" or "secondaryPath". The
107
home's value will be the contents of that field. The !field tells Dovecot to
108
fetch the field's value but not to do anything with it otherwise.
110
Variables and domains
111
---------------------
113
User names and domains may be distinguished using the <Variables.txt> %n and
114
%d. They split the /previous username/ at the "@" character. The /prevous
117
* For LMTP, it will be user@hostname, where hostname depends on e.g. the
118
Postfix configuration.
119
* For IMAP, it will be whatever the password database has designated as the
120
username. If the (LDAP) password database has "user_attrs = =user=%n", then
121
the domain part of the login name will be stripped by the password database.
122
The UserDB will not see any domain part, i.e. %n and %u are the same thing
125
The UserDB may set a new username, too, using "user_attrs = =user=...". This
129
* %u and %d variables in other parts of the configuration (e.g. quota file
132
(This file was created from the wiki on 2013-11-24 04:42)