{"action":"created","issue":{"url":"https://api.github.com/repos/E-F-A/v3/issues/377","repository_url":"https://api.github.com/repos/E-F-A/v3","labels_url":"https://api.github.com/repos/E-F-A/v3/issues/377/labels{/name}","comments_url":"https://api.github.com/repos/E-F-A/v3/issues/377/comments","events_url":"https://api.github.com/repos/E-F-A/v3/issues/377/events","html_url":"https://github.com/E-F-A/v3/issues/377","id":250187426,"number":377,"title":"MailWatch-AD-Sync","user":{"login":"TheGr8Wonder","id":29238486,"avatar_url":"https://avatars1.githubusercontent.com/u/29238486?v=4","gravatar_id":"","url":"https://api.github.com/users/TheGr8Wonder","html_url":"https://github.com/TheGr8Wonder","followers_url":"https://api.github.com/users/TheGr8Wonder/followers","following_url":"https://api.github.com/users/TheGr8Wonder/following{/other_user}","gists_url":"https://api.github.com/users/TheGr8Wonder/gists{/gist_id}","starred_url":"https://api.github.com/users/TheGr8Wonder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheGr8Wonder/subscriptions","organizations_url":"https://api.github.com/users/TheGr8Wonder/orgs","repos_url":"https://api.github.com/users/TheGr8Wonder/repos","events_url":"https://api.github.com/users/TheGr8Wonder/events{/privacy}","received_events_url":"https://api.github.com/users/TheGr8Wonder/received_events","type":"User","site_admin":false},"labels":[{"id":72015582,"url":"https://api.github.com/repos/E-F-A/v3/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/E-F-A/v3/milestones/19","html_url":"https://github.com/E-F-A/v3/milestone/19","labels_url":"https://api.github.com/repos/E-F-A/v3/milestones/19/labels","id":2703579,"number":19,"title":"3.0.2.4","description":null,"creator":{"login":"shawniverson","id":6255179,"avatar_url":"https://avatars3.githubusercontent.com/u/6255179?v=4","gravatar_id":"","url":"https://api.github.com/users/shawniverson","html_url":"https://github.com/shawniverson","followers_url":"https://api.github.com/users/shawniverson/followers","following_url":"https://api.github.com/users/shawniverson/following{/other_user}","gists_url":"https://api.github.com/users/shawniverson/gists{/gist_id}","starred_url":"https://api.github.com/users/shawniverson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawniverson/subscriptions","organizations_url":"https://api.github.com/users/shawniverson/orgs","repos_url":"https://api.github.com/users/shawniverson/repos","events_url":"https://api.github.com/users/shawniverson/events{/privacy}","received_events_url":"https://api.github.com/users/shawniverson/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":7,"state":"open","created_at":"2017-08-15T23:23:14Z","updated_at":"2017-09-03T13:46:09Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2017-08-15T00:06:05Z","updated_at":"2017-10-03T18:36:35Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The script works great, and the TODO look great as well..\r\n\r\nSome thoughts for those that use an Exchange environment...\r\n\r\nI ran this script, and it imported my users without issue. It however also imported all of my HealthMalboxes, Migration mailboxes, and other system related mailboxes. Perhaps some user filtering to exclude these system mailboxes - I can dig up an example for the filter.\r\n\r\nAlso if admins of the EFA enable per user scoring, it'll work great for the users that were freshly imported. However if there are distribution lists (public groups) then any spam sent to these addresses will not get scored, and pose as \"my spam filter isn't working\" by end users who are part of said groups. \r\n\r\nI'm not sure of the best way to handle this case, but it would also fall under \"shared\" mailboxes as well within Exchange. "},"comment":{"url":"https://api.github.com/repos/E-F-A/v3/issues/comments/333938193","html_url":"https://github.com/E-F-A/v3/issues/377#issuecomment-333938193","issue_url":"https://api.github.com/repos/E-F-A/v3/issues/377","id":333938193,"user":{"login":"schrotn","id":17295305,"avatar_url":"https://avatars3.githubusercontent.com/u/17295305?v=4","gravatar_id":"","url":"https://api.github.com/users/schrotn","html_url":"https://github.com/schrotn","followers_url":"https://api.github.com/users/schrotn/followers","following_url":"https://api.github.com/users/schrotn/following{/other_user}","gists_url":"https://api.github.com/users/schrotn/gists{/gist_id}","starred_url":"https://api.github.com/users/schrotn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schrotn/subscriptions","organizations_url":"https://api.github.com/users/schrotn/orgs","repos_url":"https://api.github.com/users/schrotn/repos","events_url":"https://api.github.com/users/schrotn/events{/privacy}","received_events_url":"https://api.github.com/users/schrotn/received_events","type":"User","site_admin":false},"created_at":"2017-10-03T18:36:35Z","updated_at":"2017-10-03T18:36:35Z","author_association":"NONE","body":"Fair warning: I'm far from a PHP programmer.  I know enough to hack at it.  Feel free to tidy it up to your standards if you want to use it.\r\nThis should separate out the actual users and groups from the rest of the LDAP entries it receives:\r\n\r\n    $ldap_search_results = \r\n        ldap_search($ds, LDAP_DN, \"(&(\" . LDAP_USERNAME_FIELD . \"=\" . $character . \"*)(\" . sprintf(LDAP_FILTER, '*') . \"))\",\r\n            array(LDAP_USERNAME_FIELD,'objectclass','objectcategory','groupType','displayName','mail','proxyaddresses'),0,0) \r\n            or die(__('ldpaauth203'));\r\n    \r\n    if ($DEBUG === true && ( $ldap_search_results === false || ldap_count_entries($ds, $ldap_search_results) === 0 )) {\r\n        echo(\"No entries for\" . $character . '\\n');\r\n    }\r\n\r\n    // Prepare to iterate and sync\r\n    if ($ldap_search_results !== false && ldap_count_entries($ds, $ldap_search_results) >= 1) {\r\n        $results = ldap_get_entries($ds, $ldap_search_results) or die(__('ldpaauth303'));\r\n        ldap_free_result($ldap_search_results);\r\n        foreach ($results as $result) {\r\n            if (is_array($result['objectclass']) === true && is_array($result['objectcategory']) === true) {\r\n                if (in_array('user', array_values($result['objectclass']), true) === true && in_array('person', array_values($result['objectcategory']),true) === true) {\r\n                    **User code removed for length**\r\n                } \r\n                elseif (in_array('group', array_values($result['objectclass']), true) === true && in_array('group', array_values($result['objectcategory']),true) === true) {\r\n                    **Group code not yet written**\r\n                }\r\n            }\r\n        }\r\n    }"}}
{"actor":{"display_login":"schrotn"}}