Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use fusiondirectory with a mailserver solution for authentication #38

Open
mamiapatrick opened this issue Feb 22, 2021 · 3 comments
Open

Comments

@mamiapatrick
Copy link

I find these maill server that allow a backend authentication with LDAP so i wanted to use my LDAP based on fusiondirectory to use that mailserver.
SO i wanted to know is there some plugins to activate to use fusiondirectory with postfix and dovecot?
What are the attributes on fusiondirectory schema for email?

To setup the mail server https://github.com/docker-mailserver/docker-mailserver/wiki/Configure-LDAP i have to setup these parameter and that are the param i put in my config but

DOVECOT_PASS_ATTRS: uid=user,userPassword=password
DOVECOT_PASS_FILTER: (&(objectClass=inetOrgPerson)(mail=%s))
DOVECOT_USER_ATTR: DOVECOT_USER_ATTRS=homeDirectory=home,gidNumber=gid,uidNumber=uid,mailMessageStore=mail
DOVECOT_USER_FILTER: (&(objectClass=inetOrgPerson)(mail=%s))
LDAP_QUERY_FILTER_ALIAS: (&(objectClass=user)(otherMailbox=%s))
LDAP_QUERY_FILTER_DOMAIN: (|(mail=@%s)(mailalias=@%s)(mailGroupMember=*@%s))
LDAP_QUERY_FILTER_GROUP: (&(|(memberof=cn=it,ou=groups,dc=mydomain,dc=ext,dc=ext)(memberof=cn=designers,ou=groups,dc=mydomain,dc=ext,dc=ext))(mail=%s))
LDAP_QUERY_FILTER_USER: (&(objectclass=gosaMailAccount)(mail=%s))

And unfortunately the example in their wiki illustrates this for a directory that has the qmail-schema installed and that uses uid so i'm looking for a setup with your solution

@hanneshier
Copy link

Hello @mamiapatrick,
have you found a working solution for this setup?

@mamiapatrick
Copy link
Author

Hello @hanneshier no I didn't. Let me know if you find one solution

@hanneshier
Copy link

hanneshier commented Dec 28, 2021

@mamiapatrick With a lot of trial an error, I found a working solution for me! Let me know if its working for you too, or if you have any questions concerning my FusionDirectory setup.

# -----------------------------------------------
# --- LDAP Section ------------------------------
# -----------------------------------------------

ENABLE_LDAP=1
LDAP_START_TLS=
LDAP_SERVER_HOST=openldap
LDAP_SEARCH_BASE=dc=example,dc=org
LDAP_BIND_DN=cn=mailserver,ou=dsa,dc=example,dc=org # you can also use your admin DN here
LDAP_BIND_PW=supersecretpassword

# https://github.com/docker-mailserver/docker-mailserver/issues/1828

LDAP_QUERY_FILTER_DOMAIN=(|(mail=*@%s)(gosaMailAlternateAddress=*@%s)(mailGroupMember=*@%s))
LDAP_QUERY_FILTER_USER=(&(objectClass=gosaMailAccount)(mail=%s))
LDAP_QUERY_FILTER_ALIAS=(&(objectClass=gosaMailAccount)(gosaMailAlternateAddress=%s))
LDAP_QUERY_FILTER_GROUP=(|) # I have no solution for groups yet, but didnt need so did not really try

# -----------------------------------------------
# --- Dovecot Section ---------------------------
# -----------------------------------------------

DOVECOT_AUTH_BIND=yes
DOVECOT_PASS_ATTRS=mail=user,userPassword=password
DOVECOT_USER_ATTRS==home=/var/mail/%d/%u,=uid=5000,=gid=5000,
DOVECOT_PASS_FILTER=(&(objectClass=gosaMailAccount)(mail=%u))
DOVECOT_USER_FILTER=(&(objectClass=gosaMailAccount)(mail=%u))

DOVECOT_TLS=no
DOVECOT_MAILBOX_FORMAT=maildir


# -----------------------------------------------
# --- SASL Section ------------------------------
# -----------------------------------------------

ENABLE_SASLAUTHD=1
SASLAUTHD_MECHANISMS=rimap
SASLAUTHD_MECH_OPTIONS=127.0.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants