ASSP & LDAP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ASSP & LDAP

michelinux (Bugzilla)
I'm going to implement ASSP in a quite large cluster of mailservers
(about 50000 mailboxes) but I need some customization to the code.
I can make this changes myself but I want to know if someone else is
working on the same piece of code; I can share my patches if someone
is interested.

The first customization is in LDAPFilter parameter: I need to use
separately username and domainname in the query,  EMAILADDRESS is not
good for my LDAP structure.
I think this is quite easy to do.

The second customization is to use an LDAP query for localDomains
because my domain list changes many times a day.
Do you think I'm going to break something?
Does ASSP need the full list somewhere instead of seaching single
entries when needed?
Is localDomains analized more times for every incoming mail or just once?

Another question: is it known a date for next stable release of ASSP?
Should I make my patch to 1.2.5(2) or 1.2.6?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Assp-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/assp-devel
Reply | Threaded
Open this post in threaded view
|

Re: ASSP & LDAP

Fritz Borgstedt
ASSP Development Discussion <[hidden email]>
schreibt:
>Another question: is it known a date for next stable release of ASSP?
>Should I make my patch to 1.2.5(2) or 1.2.6?

If you need it fast, use 1.2.5.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Assp-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/assp-devel
Reply | Threaded
Open this post in threaded view
|

Re: ASSP & LDAP

michelinux (Bugzilla)
If someone is intrested, here is my patch against 1.2.6 that allows
USERNAME and DOMAIN in LDAPFilter and DOMAIN in LDAPRoot:

--- assp.pl.126 2006-11-17 12:32:01.000000000 +0100
+++ assp.pl     2006-11-17 12:36:18.000000000 +0100
@@ -343,11 +343,14 @@
   'Enter the password for the specified LDAP login here.'],
  [LDAPRoot,'LDAP Root container',60,textinput,'','(.*)',undef,
   'The LDAP lookup will use this container and all sub-containers to
match the query.<br />
+  The literal DOMAIN is replaced by the domain part of SMTP recipient
(eg. domain.com) during the search.<br />
   For example: DC=yourcompany,DC=com'],
  [LDAPFilter,'LDAP Filter',60,textinput,'','(\S*)',undef,
   'This filter is used to query the LDAP database. This strongly
depends on the LDAP structure.<br />
   The filter must return an entry if the recipient address matches
with that of any user.<br />
   The literal EMAILADDRESS is replaced by the fully qualified SMTP
recipient (eg. [hidden email]) during the search.<br />
+  The literal USERNAME is replaced by the user part of SMTP recipient
(eg. user) during the search.<br />
+  The literal DOMAIN is replaced by the domain part of SMTP recipient
(eg. domain.com) during the search.<br />
   For example: (proxyaddresses=smtp:EMAILADDRESS)'],
  [ValidateLog,'Enable Validation logging',0,checkbox,0,'(.*)',undef,
   'Enables verbose logging of local address validation actions in the
maillog. Default is to log validation errors only.
@@ -2555,9 +2558,16 @@
  $h = $1 if $h=~/\@(.*)/;
  # do LDAP lookup
  $current_email = "$1$h";
+ $at_position = index($current_email, '@');
+ $current_username = substr($current_email, 0, $at_position);
+ $current_domain = substr($current_email, $at_position + 1);
  $ldapflt = $LDAPFilter;
  $ldapflt =~ s/EMAILADDRESS/$current_email/g;
- print DEBUG  "doing LDAP lookup with $ldapflt in $LDAPRoot\n" if $DEBUG;
+ $ldapflt =~ s/USERNAME/$current_username/g;
+ $ldapflt =~ s/DOMAIN/$current_domain/g;
+ $ldaproot = $LDAPRoot;
+ $ldaproot =~ s/DOMAIN/$current_domain/g;
+ print DEBUG  "doing LDAP lookup with $ldapflt in $ldaprootoot\n" if $DEBUG;


 @ldaplist = split(/\|/,$LDAPHost);
@@ -2588,7 +2598,7 @@
   return 1;
  }
  # perform a search
- $mesg = $ldap->search( base   => $LDAPRoot,
+ $mesg = $ldap->search( base   => $ldaproot,
                         filter => $ldapflt,
                         attrs => ['cn']
                        );

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Assp-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/assp-devel
Reply | Threaded
Open this post in threaded view
|

Re: ASSP & LDAP

michelinux (Bugzilla)
Please tell me if this patch against 1.2.6(34) is acceptable or if
changes are needed.

adds ability to search local domains in LDAP

adds LDAPFail configuration variable to set default response for LDAP querys

moves common LDAP parameteters from  "Validate Local Addresses" to
"Other Settings" section

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Assp-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/assp-devel

patch.1.2.6.34 (9K) Download Attachment