This file is indexed.

/usr/share/doc/dovecot-core/dovecot/wiki/UserDatabase.Prefetch.txt is in dovecot-core 1:2.0.19-0ubuntu2.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Prefetch User Database
======================

Prefetch userdb can be used to combine passdb and userdb lookups into a single
lookup. It's usually used with <SQL> [AuthDatabase.SQL.txt], <LDAP>
[AuthDatabase.LDAP.txt] and <checkpassword>
[PasswordDatabase.CheckPassword.txt] passdbs.

Prefetch basically works by requiring that the passdb returns the userdb
information in <extra fields> [PasswordDatabase.ExtraFields.txt] with 'userdb_'
prefixes. For example if a userdb typically returns 'uid', 'gid' and 'home'
fields, the passdb would have to return 'userdb_uid', 'userdb_gid' and
'userdb_home' fields.

If you're using <LDA.txt>, you still need a valid userdb which can be used to
locate the users. You can do this by adding a normal SQL/LDAP userdb *after the
userdb prefetch*. The order of definitions is significant. See below for
examples.

LDAP's 'auth_bind_userdn=yes' setting is incompatible with prefetch, because no
passdb lookup is done then. If you want zero LDAP lookups, you might want to
user <static userdb> [UserDatabase.Static.txt] instead of prefetch.

SQL example
-----------

'dovecot.conf':

---%<-------------------------------------------------------------------------
passdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
  driver = prefetch
}
# The userdb below is used only by lda.
userdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf.ext
}
---%<-------------------------------------------------------------------------

'dovecot-sql.conf.ext':

---%<-------------------------------------------------------------------------
password_query = SELECT userid AS user, password, \
  home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
  FROM users \
  WHERE userid = '%u'

# For deliver:
user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
---%<-------------------------------------------------------------------------

LDAP example
------------

'dovecot.conf':

---%<-------------------------------------------------------------------------
passdb {
  driver = ldap
  args = /etc/dovecot/dovecot-ldap.conf.ext
}
userdb {
  driver = prefetch
}
# The userdb below is used only by deliver.
userdb {
  driver = ldap
  args = /etc/dovecot/dovecot-ldap.conf.ext
}
---%<-------------------------------------------------------------------------

'dovecot-ldap.conf.ext':

---%<-------------------------------------------------------------------------
pass_attrs = uid=user, userPassword=password, \
  homeDirectory=userdb_home, uidNumber=userdb_uid, gidNumber=userdb_gid

# For deliver:
user_attrs = homeDirectory=home, uidNumber=uid, gidNumber=gid
---%<-------------------------------------------------------------------------

(This file was created from the wiki on 2012-03-15 16:41)