This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sogodovecotldapandgroups [2011/07/07 11:26] – Correct link markup jim | sogodovecotldapandgroups [2016/02/05 12:44] (current) – Fix Python script. jim | ||
---|---|---|---|
Line 23: | Line 23: | ||
We don't want every group to be a POSIX group. They need to have a '' | We don't want every group to be a POSIX group. They need to have a '' | ||
- | So we're using the [[http:// | + | So we're using the [[http:// |
===== Groups membership in OpenLDAP ===== | ===== Groups membership in OpenLDAP ===== | ||
Line 37: | Line 37: | ||
So in Dovecot configuration I set up a post-login script: | So in Dovecot configuration I set up a post-login script: | ||
- | | + | < |
- | executable = imap imap-postlogin | + | service imap { |
- | } | + | executable = imap imap-postlogin |
- | service imap-postlogin { | + | } |
- | # all post-login scripts are executed via script-login binary | + | |
- | executable = script-login -d / | + | |
- | | + | service imap-postlogin { |
- | user = $default_internal_user | + | # all post-login scripts are executed via script-login binary |
- | # this UNIX socket listener must use the same name as given to imap executable | + | executable = script-login -d / |
- | unix_listener imap-postlogin { | + | |
- | } | + | |
+ | user = $default_internal_user | ||
+ | |||
+ | | ||
+ | unix_listener imap-postlogin { | ||
} | } | ||
+ | } | ||
+ | </ | ||
| | ||
We currently have '' | We currently have '' | ||
Line 78: | Line 82: | ||
| | ||
for dn, entry in res: | for dn, entry in res: | ||
- | for g in entry[' | + | |
- | # Returns ' | + | |
- | # Fish out 'All UK staff' as group name. | + | # Returns ' |
- | groups.append(g.split(',', | + | # Fish out 'All UK staff' as group name. |
- | + | groups.append(g.split(',', | |
+ | | ||
+ | pass # User in no groups. | ||
+ | | ||
os.environ[" | os.environ[" | ||
try: | try: |