> Have you given https://dovecot.org/upgrader a try to see if it can massage
> your config better?
Yes, the config I had manually ported prior to the existence of the upgrader
was almost 1:1, with a few more advanced settings I had configured missing from
the upgrader. I did another try the output is about the same as last time;
here's the output of the latest run:
namespace virtual {
hidden = yes
list = children
prefix = Search Folders.
subscriptions = no
type = private
mailbox All {
auto = subscribe
comment = All messages, excluding Junk and Trash
special_use = \All
}
mailbox Unread {
auto = subscribe
comment = All unread messages, excluding Junk and Trash
special_use = \Important
}
mailbox Flagged {
auto = subscribe
comment = All flagged messages
special_use = \Flagged
}
}
namespace virtual-user {
hidden = yes
list = children
prefix = User Search Folders.
subscriptions = no
type = private
}
And this is the original from my last working 2.3 config:
namespace virtual {
type = private
separator = .
prefix = "Search Folders."
location =
virtual:/etc/dovecot/virtual:INDEX=~/dovecot-virtual.cache:CONTROL=~/dovecot-virtual.cache:VOLATILEDIR=~/dovecot-virtual.cache
hidden = yes
list = children
subscriptions = no
mailbox All {
auto = subscribe
special_use = \All
comment = All messages, excluding Junk and Trash
}
mailbox Unread {
auto = subscribe
special_use = \Important
comment = All unread messages, excluding Junk and Trash
}
mailbox Flagged {
auto = subscribe
special_use = \Flagged
comment = All flagged messages
}
}
namespace virtual-user {
type = private
separator = .
prefix = "User Search Folders."
location =
virtual:~/.virtual:INDEX=~/dovecot-virtual.user.cache:CONTROL=~/dovecot-virtual.user.cache:VOLATILEDIR=~/dovecot-virtual.user.cache:LAYOUT=maildir++
hidden = yes
list = children
subscriptions = no
}
You can see the tool misses some entries I had to add back manually. As far as
I can tell, the final 2.4 config send in my first message should be 1:1 to the
2.3 config in functionality.
> Can you give us a hint what the error was?
For the LDAP caching issue, it's the same as he reported in his email:
auth: Fatal: auth-cache: ou=dudes,dc=mysite: Cache key must contain at
least one variable
I messed around with various configurations, and this one was the one that
finally ended up working:
ldap_uris = ldapi://somesock
ldap_base = ou=dudes,dc=mysite
passdb ldap {
ldap_connection_group = login
bind = yes
bind_userdn = uid=%{user | username | lower },ou=dudes,dc=mysite
# LDAP FIX
filter = (&(objectClass=inetOrgPerson)(uid=%{user | username | lower }))
ldap_auth_dn = cn=dovecot,ou=serviceaccount,dc=mysite
ldap_auth_dn_password = secret
# fields {
# user = %{ldap:uid}
# }
}
# LDAP FIX
userdb static {
fields {
uid = mail
gid = mail
home = $SET:mail_home
}
}
# userdb ldap {
# ldap_auth_dn = cn=dovecot,ou=serviceaccount,dc=mysite
# ldap_auth_dn_password = secret
# filter = (&(objectClass=inetOrgPerson)(uid=%{user | username | lower }))
# fields {
# user = %{ldap:uid}
# uid = %{ldap:uidNumber | default('mail')}
# gid = %{ldap:gidNumber | default('mail')}
# home = %{ldap:homeDirectory | default($SET:mail_home)}
# }
# iterate_filter = (objectClass=inetOrgPerson)
# iterate_fields {
# user = %{ldap:uid}
# }
# }
And for reference, here is the 2.3 config:
passdb {
driver = ldap
args = /etc/dovecot/ldap-passdb.conf.ext
}
userdb {
driver = ldap
default_fields = uid=mail gid=mail home=/var/mail/%Ln
args = /etc/dovecot/ldap-userdb.conf.ext
}
ldap-passdb.conf.ext:
uris = ldapi://somesock
base = ou=dudes,dc=mysite
auth_bind = yes
auth_bind_userdn = uid=%Ln,ou=dudes,dc=mysite
ldap-userdb.conf.ext:
uris = ldapi://somesock
dn = cn=dovecot,ou=serviceaccount,dc=mysite
dnpass = secret
base = ou=dudes,dc=mysite
iterate_filter = (objectClass=inetOrgPerson)
iterate_attrs = uid=username
user_filter = (&(objectClass=inetOrgPerson)(uid=%Ln))
user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid
Sorry, I thought I had sent this in my original email. The commented out parts
and the ones included after the LDAP FIX headers (the extra entries in the
passdb and the static userdb) are the parts that don't work and trigger the
cache bug. The thread "2.4.2 breaks user iterations for LDAP" has more
information.
Regards.
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]