How to integrate E.F.A with Active Directory before 3.0.0.5

Questions and answers about how to do stuff
User avatar
shawniverson
Posts: 3650
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: How to integrate E.F.A with Active Directory before 3.0.

Post by shawniverson »

I see what you are saying. Have you tried setting user filters for the proxy addresses?

http://mailwatch.sourceforge.net/doku.p ... nistration
dodino
Posts: 2
Joined: 07 Oct 2014 08:41

Re: How to integrate E.F.A with Active Directory before 3.0.

Post by dodino »

shawniverson wrote:I see what you are saying. Have you tried setting user filters for the proxy addresses?

http://mailwatch.sourceforge.net/doku.p ... nistration
Thanks shawniverson, the filter option is exactly what I needed!
bryanyoung
Posts: 6
Joined: 10 Oct 2014 20:20

Re: How to integrate E.F.A with Active Directory before 3.0.

Post by bryanyoung »

I can't seem to get the relay_recipients populated. I've changed my filter as suggested and get no errors, just a blank file. It's a pretty standard Microsoft AD but it doesn't seem to be returning any results from the query.

Base DN

Code: Select all

$hqbase="cn=Users,dc=domain,dc=com";
My filter is

Code: Select all

@args = ( base     => $hqbase,
	   filter => "(objectclass=user)",
          control  => [ $page ],
          attrs  => "proxyAddresses",
	);

I thought this was just the filter, but I've confirned the filter and base DN with another tool. But still have an empty rrelay_recipients file. Scratching my head. I empty added the name of each user from the query to the file and get nothing.
User avatar
shawniverson
Posts: 3650
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: How to integrate E.F.A with Active Directory before 3.0.

Post by shawniverson »

Just for giggles, try an OU instead of a CN container...maybe put a user in an OU and see if it will sync....
colin
Posts: 99
Joined: 13 Feb 2014 16:09

Re: How to integrate E.F.A with Active Directory before 3.0.

Post by colin »

I'm just trying to get this working and have found that it works in a CN but not in an OU

But if I use $hqbase="dc=example,dc=com" then it picks up everything (CN and OU)
toddh
Posts: 69
Joined: 16 Feb 2015 18:52

Re: How to integrate E.F.A with Active Directory before 3.0.0.5

Post by toddh »

Sorry to bring open and old thread but I have problem I dont see a solution for here.

I want to create my relay_recipients from Exchange LDAP.

When I run the LDAP install it gives an error.

perl -MCPAN -e shell
install Net::LDAP
.
.
.
.

Tests succeeded but one dependency not OK (GSSAPI)
MARSCHAP/perl-ldap-0.64.tar.gz
[dependencies] --NA
Running make install
make test had returned bad status, won't install without force
Failed during this command
AGROLMS/GSSAPI-0.28.tar.gz :make_test NO
MARSCHAP/perl-ldap-0.64.tar.gz : make_test NO one depenency not OK (GSSAPI)

Is there a way to resolve this or can I force the install safely with:
force install Net::LDAP

Thanks

Todd
User avatar
shawniverson
Posts: 3650
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: How to integrate E.F.A with Active Directory before 3.0.0.5

Post by shawniverson »

Code: Select all

sudo yum install perl-POE-Component-Client-LDAP
I believe this has the Net::LDAP perl module already.
ace
Posts: 1
Joined: 03 Jul 2015 01:25

Re: How to integrate E.F.A with Active Directory before 3.0.0.5

Post by ace »

hi team, firstly great work... i have issue with this script and I am not sure why,.

I have managed to integrate checking the web portal with AD and users can login fine to release spam etc.

but the ad integration script with AD keeps displaying this error:

> /usr/local/bin/mailwatch/tools/Cron_jobs/mailwatch_ldap_sync.sh
ldap_bind: Invalid credentials (49)
additional info: 80090308: LdapErr: DSID-0C0903C8, comment: AcceptSecurityContext error, data 52e, v2580
/usr/local/bin/mailwatch/tools/Cron_jobs/mailwatch_ldap_sync.sh: line 138: /tmp/tmp.ee2n4L9sVA: No such file or directory

Any of your great assistance would be appreciated.
toddh
Posts: 69
Joined: 16 Feb 2015 18:52

Re: How to integrate E.F.A with Active Directory before 3.0.0.5

Post by toddh »

Thanks for all the info on this one.

Set this up and LDAP was working but still getting an empty file, found we had to add brackets around the proxy address in the filter section.

Changed:

Code: Select all

attrs  => "proxyAddresses",
to

Code: Select all

attrs  => ["proxyAddresses"],
For our filter we are using:

Code: Select all

 filter => "(&(sAMAccountName=*)(mail=*))",
          control  => [ $page ],
          attrs  => ["proxyAddresses"],
);
We import emails from several sources every hour into transport and relay_recipient tables so postfix rejects any but valid email addresses on our system.
radiogen
Posts: 4
Joined: 30 Jan 2017 10:57

Re: How to integrate E.F.A with Active Directory before 3.0.0.5

Post by radiogen »

can someone share WORKING script for syncing "mail" field (not proxyaddress) from AD to postfix relay_recipients ???
radiogen
Posts: 4
Joined: 30 Jan 2017 10:57

Re: How to integrate E.F.A with Active Directory before 3.0.0.5

Post by radiogen »

Zwabber wrote: 01 Feb 2017 09:20 Download the script here;
https://marcocarcano.wordpress.com/getadsmtp-pl-script/
thanks, I've tried this script but its for "proxyAddresses" not for "mail" field and its populate nothing into relay_recipient_maps.
Post Reply