You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- LDAP-MAILCOW_SOGO_LDAP_FILTER=objectClass='user' AND objectCategory='person' AND memberOf:1.2.840.113556.1.4.1941:='CN=Group,CN=Users,DC=example DC=local'
42
43
```
43
44
44
45
3. Configure environmental variables:
@@ -50,7 +51,9 @@ A python script periodically checks and creates new LDAP accounts and deactivate
50
51
* `LDAP-MAILCOW_API_HOST` - mailcow API url. Make sure it's enabled and accessible from within the container for both reads and writes
51
52
* `LDAP-MAILCOW_API_KEY` - mailcow API key (read/write)
52
53
* `LDAP-MAILCOW_SYNC_INTERVAL` - interval in seconds between LDAP synchronizations
53
-
* `LDAP-MAILCOW_LDAP_FILTER` - _optional_ LDAP filter to apply, defaults to `(&(objectClass=user)(objectCategory=person))`
54
+
* **Optional** LDAP filters (see example above). SOGo uses special syntax, so you either have to **specify both or none**:
55
+
* `LDAP-MAILCOW_LDAP_FILTER` - LDAP filter to apply, defaults to `(&(objectClass=user)(objectCategory=person))`
56
+
* `LDAP-MAILCOW_SOGO_LDAP_FILTER` - LDAP filter to apply for SOGo ([special syntax](https://sogo.nu/files/docs/SOGoInstallationGuide.html#_authentication_using_ldap)), defaults to `objectClass='user' AND objectCategory='person'`
54
57
55
58
4. Start additional container: `docker-compose up -d ldap-mailcow`
56
59
5. Check logs `docker-compose logs ldap-mailcow`
@@ -69,7 +72,7 @@ These files have been tested against Active Directory running on Windows Server
69
72
70
73
### WebUI and EAS authentication
71
74
72
-
This tool enables authentication for Dovecot and SOGo, which means you will be able to log into POP3, SMTP, IMAP, and SOGo Web-Interface. **You will not be able to log into mailcow UI or EAS.**
75
+
This tool enables authentication for Dovecot and SOGo, which means you will be able to log into POP3, SMTP, IMAP, and SOGo Web-Interface. **You will not be able to log into mailcow UI or EAS using your LDAP credentials by default.**
73
76
74
77
As a workaround, you can hook IMAP authentication directly to mailcow by adding the following code above [this line](https://github.com/mailcow/mailcow-dockerized/blob/48b74d77a0c39bcb3399ce6603e1ad424f01fc3e/data/web/inc/functions.inc.php#L608):
75
78
@@ -81,16 +84,16 @@ As a workaround, you can hook IMAP authentication directly to mailcow by adding
81
84
}
82
85
```
83
86
84
-
As a side-effect, It will also allow logging into mailcow UI using mailcow app passwords (since they are valid for IMAP). **It is not a supported solution with mailcow and has to be done only on your own risk!**
87
+
As a side-effect, It will also allow logging into mailcow UI using mailcow app passwords (since they are valid for IMAP). **It is not a supported solution with mailcow and has to be done only at your own risk!**
85
88
86
-
### Two-ways sync
89
+
### Two-way sync
87
90
88
91
Users from your LDAP directory will be added (and deactivated if disabled/not found) to your mailcow database. Not vice-versa, and this is by design.
89
92
90
-
## Customizations & Integration help
93
+
## Customizations and Integration support
91
94
92
-
External authentication (identify federation) is an enterprise feature [for mailcow](https://github.com/mailcow/mailcow-dockerized/issues/2316#issuecomment-491212921). That’s why I developed an external solution, and it is unlikely that it’ll be directly integrated into mailcow ever.
95
+
External authentication (identity federation) is an enterprise feature [for mailcow](https://github.com/mailcow/mailcow-dockerized/issues/2316#issuecomment-491212921). That’s why I developed an external solution, and it is unlikely that it’ll be ever directly integrated into mailcow.
93
96
94
-
I’ve created this tool because I needed it for my regular work. You are free to use it for commercial needs. Please understand that I can work on issues only if they fall within the scope of my work interests or if I’ll have some available free time (never happened for many years). I’ll do my best to review submitted PRs ASAP, though.
97
+
I’ve created this tool because I needed it for my regular work. You are free to use it for commercial needs. Please understand that I can work on issues only if they fall within the scope of my current work interests or if I’ll have some available free time (never happened for many years). I’ll do my best to review submitted PRs ASAP, though.
95
98
96
99
**You can always [contact me](mailto:[email protected]) to help you with the integration or for custom modifications on a paid basis. My current hourly rate (ActivityWatch tracked) is 100,-€ with 3h minimum commitment.**
config['SOGO_LDAP_FILTER'] =os.environ['LDAP-MAILCOW_SOGO_LDAP_FILTER'] if'LDAP-MAILCOW_SOGO_LDAP_FILTER'inos.environelse"objectClass='user' AND objectCategory='person'"
0 commit comments