~ubuntu-branches/ubuntu/utopic/dovecot/utopic-proposed

« back to all changes in this revision

Viewing changes to doc/wiki/AuthDatabase.LDAP.Userdb.txt

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-01-08 09:35:49 UTC
  • mfrom: (4.1.35 sid)
  • Revision ID: package-import@ubuntu.com-20140108093549-i72o93pux8p0dlaf
Tags: 1:2.2.9-1ubuntu1
* Merge from Debian unstable, remaining changes:
  + Add mail-stack-delivery package:
    - Update d/rules
    - d/control: convert existing dovecot-postfix package to a dummy
      package and add new mail-stack-delivery package.
    - Update maintainer scripts.
    - Rename d/dovecot-postfix.* to debian/mail-stack-delivery.*
    - d/mail-stack-delivery.preinst: Move previously installed backups and
      config files to a new package namespace.
    - d/mail-stack-delivery.prerm: Added to handle downgrades.
  + Use Snakeoil SSL certificates by default:
    - d/control: Depend on ssl-cert.
    - d/dovecot-core.postinst: Relax grep for SSL_* a bit.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - d/dovecot-core.ufw.profile: new ufw profile.
    - d/rules: install profile in dovecot-core.
    - d/control: dovecot-core - suggest ufw.
  + d/dovecot-core.dirs: Added usr/share/doc/dovecot-core
  + Add apport hook:
    - d/rules, d/source_dovecot.py
  + Add upstart job:
    - d/rules, d/dovecot-core.dovecot.upstart, d/control,
      d/dovecot-core.dirs, dovecot-imapd.{postrm, postinst, prerm},
      d/dovecot-pop3d.{postinst, postrm, prerm}.
      d/mail-stack-deliver.postinst: Convert init script to upstart.
  + Use the autotools-dev dh addon to update config.guess/config.sub for
    arm64.
* Dropped changes, included in Debian:
  - Update Dovecot name to reflect distribution in login greeting.
  - Update Drac plugin for >= 2.0.0 support.
* d/control: Drop dovecot-postfix package as its no longer required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
  =mail=maildir:/var/vmail/%d/%n/Maildir
62
62
---%<-------------------------------------------------------------------------
63
63
 
64
 
(This file was created from the wiki on 2012-04-23 04:42)
 
64
Attribute templates (v2.1)
 
65
--------------------------
 
66
 
 
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:
 
69
 
 
70
---%<-------------------------------------------------------------------------
 
71
user_attrs = \
 
72
  =quota_rule=*:bytes=%{ldap:quotaBytes}, \
 
73
  =home=/home/%{ldap:userDomain}/%{ldap:userName}
 
74
---%<-------------------------------------------------------------------------
 
75
 
 
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.
 
79
 
 
80
Subqueries and pointers (v2.2)
 
81
------------------------------
 
82
 
 
83
LDAP values can now have DN pointers to other entries that are queried.
 
84
Example:
 
85
 
 
86
---%<-------------------------------------------------------------------------
 
87
user_attrs = \
 
88
  =user=%{ldap:uid}, \
 
89
  @mail=%{ldap:mailDN}, \
 
90
  =uid=%{ldap:uidNumber@mail}, \
 
91
  =gid=%{ldap:gidNumber@mail}, \
 
92
  =home=%{ldap:rootPath@mail}/%d/%n
 
93
---%<-------------------------------------------------------------------------
 
94
 
 
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
 
97
lookup's results.
 
98
 
 
99
---%<-------------------------------------------------------------------------
 
100
user_attrs = \
 
101
  =user=%{ldap:uid}, \
 
102
  =home=%{ldap_ptr:activePath}, \
 
103
  !primaryPath, !secondaryPath
 
104
---%<-------------------------------------------------------------------------
 
105
 
 
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.
 
109
 
 
110
Variables and domains
 
111
---------------------
 
112
 
 
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
 
115
username/ is:
 
116
 
 
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
 
123
   for the UserDB.
 
124
 
 
125
The UserDB may set a new username, too, using "user_attrs = =user=...".  This
 
126
will be used for
 
127
 
 
128
 * Logging
 
129
 * %u and %d variables in other parts of the configuration (e.g. quota file
 
130
   names)
 
131
 
 
132
(This file was created from the wiki on 2013-11-24 04:42)