New to dovecot admin, question about using LDAP for user-specific values
I am new to dovecot administration. I’ve read the Wiki but that hasn’t given me the understanding I need.
When I query my LDAP (on macOS) on a value for user ‘gerben’, I can get that:
dumbledore:~ gerben$ dscl /LDAPv3/127.0.0.1 -read /users/gerben GeneratedUID GeneratedUID: 780D870E-6B00-478E-AB70-3D3307215A82
I would like to use that value in dovecot settings, e.g. something like
user_attrs =
=mail=maildir://Library/Server/Mail/Data/mail/%{ldap:GeneratedUID}
Is this possible and if so what do I exactly need to do to get this working?
Gerben Wierda Chess and the Art of Enterprise Architecture https://ea.rna.nl/the-book/ Mastering ArchiMate https://ea.rna.nl/the-book-edition-iii/ Architecture for Real Enterprises https://www.infoworld.com/blog/architecture-for-real-enterprises/ at InfoWorld On Slippery Ice https://eapj.org/on-slippery-ice/ at EAPJ
Nobody?
On 10 Sep 2019, at 11:58, Gerben Wierda via dovecot dovecot@dovecot.org wrote:
I am new to dovecot administration. I’ve read the Wiki but that hasn’t given me the understanding I need.
When I query my LDAP (on macOS) on a value for user ‘gerben’, I can get that:
dumbledore:~ gerben$ dscl /LDAPv3/127.0.0.1 -read /users/gerben GeneratedUID GeneratedUID: 780D870E-6B00-478E-AB70-3D3307215A82
I would like to use that value in dovecot settings, e.g. something like
user_attrs =
=mail=maildir://Library/Server/Mail/Data/mail/%{ldap:GeneratedUID} maildir://Library/Server/Mail/Data/mail/%%7Bldap:GeneratedUID%7DIs this possible and if so what do I exactly need to do to get this working?
Gerben Wierda Chess and the Art of Enterprise Architecture https://ea.rna.nl/the-book/ Mastering ArchiMate https://ea.rna.nl/the-book-edition-iii/ Architecture for Real Enterprises https://www.infoworld.com/blog/architecture-for-real-enterprises/ at InfoWorld On Slippery Ice https://eapj.org/on-slippery-ice/ at EAPJ
Le 13 sept. 2019 à 09:29, Gerben Wierda via dovecot dovecot@dovecot.org a écrit :
Nobody?
On 10 Sep 2019, at 11:58, Gerben Wierda via dovecot
mailto:dovecot@dovecot.org> wrote: I am new to dovecot administration. I’ve read the Wiki but that hasn’t given me the understanding I need.
When I query my LDAP (on macOS) on a value for user ‘gerben’, I can get that:
dumbledore:~ gerben$ dscl /LDAPv3/127.0.0.1 -read /users/gerben GeneratedUID GeneratedUID: 780D870E-6B00-478E-AB70-3D3307215A82
I would like to use that value in dovecot settings, e.g. something like
user_attrs =
=mail=maildir://Library/Server/Mail/Data/mail/%{ldap:GeneratedUID} maildir://Library/Server/Mail/Data/mail/%%7Bldap:GeneratedUID%7DIs this possible and if so what do I exactly need to do to get this working?
As the answer is in the question, it is hard to give you any hint about what should be done.
What is wrong with
user_attrs =
=mail=maildir://Library/Server/Mail/Data/mail/%{ldap:GeneratedUID} maildir://Library/Server/Mail/Data/mail/%25%7Bldap:GeneratedUID%7D
Did you try it ? Have you got any issue with it ?
On 13 Sep 2019, at 11:51, Jean-Daniel Dupas jddupas@xooloo.com wrote:
Le 13 sept. 2019 à 09:29, Gerben Wierda via dovecot
mailto:dovecot@dovecot.org> a écrit : Nobody?
On 10 Sep 2019, at 11:58, Gerben Wierda via dovecot
mailto:dovecot@dovecot.org> wrote: I am new to dovecot administration. I’ve read the Wiki but that hasn’t given me the understanding I need.
When I query my LDAP (on macOS) on a value for user ‘gerben’, I can get that:
dumbledore:~ gerben$ dscl /LDAPv3/127.0.0.1 -read /users/gerben GeneratedUID GeneratedUID: 780D870E-6B00-478E-AB70-3D3307215A82
I would like to use that value in dovecot settings, e.g. something like
user_attrs =
=mail=maildir://Library/Server/Mail/Data/mail/%{ldap:GeneratedUID} maildir://Library/Server/Mail/Data/mail/%%7Bldap:GeneratedUID%7DIs this possible and if so what do I exactly need to do to get this working?
As the answer is in the question, it is hard to give you any hint about what should be done.
What is wrong with
user_attrs =
=mail=maildir://Library/Server/Mail/Data/mail/%{ldap:GeneratedUID} maildir://Library/Server/Mail/Data/mail/%25%7Bldap:GeneratedUID%7DDid you try it ? Have you got any issue with it ?
I haven’t tried anything yet as I am trying to learn before I do anything (and trial and error is a very slow method), but it seems to me that just that line cannot be enough. Because how does “ldap:” know to go looking in the LDAP structure at "/Users/<username>/“ in the LDAP “/LDAPv3/127.0.0.1”? Somehow I shall have to tell dovecot that.
But if trial and error is the only way, I’ll have to try.
G
Le 13 sept. 2019 à 12:53, Gerben Wierda via dovecot dovecot@dovecot.org a écrit :
On 13 Sep 2019, at 11:51, Jean-Daniel Dupas
mailto:jddupas@xooloo.com> wrote: Le 13 sept. 2019 à 09:29, Gerben Wierda via dovecot
mailto:dovecot@dovecot.org> a écrit : Nobody?
On 10 Sep 2019, at 11:58, Gerben Wierda via dovecot
mailto:dovecot@dovecot.org> wrote: I am new to dovecot administration. I’ve read the Wiki but that hasn’t given me the understanding I need.
When I query my LDAP (on macOS) on a value for user ‘gerben’, I can get that:
dumbledore:~ gerben$ dscl /LDAPv3/127.0.0.1 -read /users/gerben GeneratedUID GeneratedUID: 780D870E-6B00-478E-AB70-3D3307215A82
I would like to use that value in dovecot settings, e.g. something like
user_attrs =
=mail=maildir://Library/Server/Mail/Data/mail/%{ldap:GeneratedUID} maildir://Library/Server/Mail/Data/mail/%%7Bldap:GeneratedUID%7DIs this possible and if so what do I exactly need to do to get this working?
As the answer is in the question, it is hard to give you any hint about what should be done.
What is wrong with
user_attrs =
=mail=maildir://Library/Server/Mail/Data/mail/%{ldap:GeneratedUID} maildir://Library/Server/Mail/Data/mail/%25%7Bldap:GeneratedUID%7DDid you try it ? Have you got any issue with it ?
I haven’t tried anything yet as I am trying to learn before I do anything (and trial and error is a very slow method), but it seems to me that just that line cannot be enough. Because how does “ldap:” know to go looking in the LDAP structure at "/Users/<username>/“ in the LDAP “/LDAPv3/127.0.0.1”? Somehow I shall have to tell dovecot that.
OK, so your question is more about how to configure LDAP in dovecot for basic usage.
If you want to query the LDAP, you first have to learn what its structure is, and then you should tell dovecot where to look at using the 'base' and 'scope' parameter and what to look at using the 'user_filter' parameter.
I never tried to access OpenDirectory using LDAP queries, so you will have to search online about how it should be done.
participants (2)
-
Gerben Wierda
-
Jean-Daniel Dupas