Comments (8)
Closed as fixed.
from sympa.
- For example on OpenLDAP, by default, page size limit seems equal to "hard size limit" (size limit of total count of results enforced by server), and not to be enforced by server (cf. Admin manual).
- On Active Directory, page size limit is enforced by MaxPageSize LDAP policy of server, and its value is lower than MaxResultSetSize (size limit of total count of results enforced by server) (cf.
Doc on technet).
I guess MaxPageSize is the challenge on Active Directory, because its default is slightly low (1000) and it is enforced by server. If several other directory servers also have the same problem, I think introducing paged search seems useful.
from sympa.
I was trying to find this link: https://sourcesup.renater.fr/tracker/?aid=7369 but it seems is down. Do you have the code? I need it to find a solution about pagination.
Thanks,
Berta
from sympa.
Hello,
Instead of modifiying LDAP server soft limit, or di paged control (my hard limit is higher), I just added sizelimit arg on Sympa/List.pm
$mesg = $db->do_operation(
'search',
base => "$ldap_suffix",
filter => "$ldap_filter",
attrs => [@attrs],
scope => "$source->{'scope'}",
+ sizelimit => 10000
);
An option (global or per list) would be better.
from sympa.
Instead of modifiying LDAP server soft limit, or di paged control (my hard limit is higher), I just added sizelimit arg on Sympa/List.pm
That is useless when the LDAP server enforces a limit. It also does not scale well.
So supporting paged queries is the way to go IMHO.
from sympa.
Replacing a standard LDAP query with a paged one is pretty straightforward. This is an excerpt of a Perl script I made to query my Active Directory infrastructure:
...
my $ldap = Net::LDAPS->new( $server, onerror => 'die' ) or die "new: $@";
my @controls = ();
# Creates a control for pages of 100 items
my $ctrl_page = Net::LDAP::Control::Paged->new( size => 100 );
push @controls, $ctrl_page;
my @ldap_args = (
base => $base,
filter => $filter,
attrs => @attributes,
callback => \&processObject,
control => @controls
);
my $cookie;
while (1) {
my $mesg = $ldap->search( @ldap_args );
$mesg->code && die $mesg->error;
if ($mesg->entries < 1) {
print STDERR "NO RESULTS\n";
}
# Retrieves the page control cookie
my($resp) = $mesg->control( LDAP_CONTROL_PAGED ) || last;
$cookie = $resp->cookie || last;
# Sets the cookie for the next search
$ctrl_page->cookie($cookie);
}
from sympa.
Instead of modifiying LDAP server soft limit, or di paged control (my hard limit is higher), I just added sizelimit arg on Sympa/List.pm
That is useless when the LDAP server enforces a limit. It also does not scale well.
So supporting paged queries is the way to go IMHO.
Yes you're right this is the best way. sizelimit is a quick workaround at least for openldap for queries between soft and hard limit, if no size.pr is specified, if I understand well openldap documentation.
from sympa.
If anyone would like to submit a pull request to make this feature request a reality, it would be appreciated.
In my opinion, it is desirable to be able to use the paged operation transparently from the do_operation()
method of Sympa::DatabaseDriver::LDAP
. To achieve this, directory servers that do not support the paged operation should be considered, such as below:
my $db = Sympa::Database->new('LDAP', ...);
if ($db->__dbh->root_dse->supported_control(
Net::LDAP::Constant::LDAP_CONTROL_PAGED()
) {
# Process paged search operations.
} else {
# Process simple search operation.
}
from sympa.
Related Issues (20)
- "Request a list" missing from webpage HOT 4
- Ubuntu distribution configuration issue HOT 1
- Will Sympa 6.2.72 work on CentOS 8/9 HOT 1
- RPM package for CentOS 8/9 HOT 3
- Support Stalwart Mail Server HOT 3
- Time to time Bulk.pl process die HOT 4
- Seeing "Could not create new lock" messages after migrating lists from old Sympa to new Sympa server HOT 15
- Footer link "Powered by Sympa 6.x" to www.sympa.community instead of www.sympa.org HOT 2
- Is it possible to have two listmasters ? How I can do it? HOT 1
- `wwsympa.fcgi: Use of uninitialized value $args[0] in pattern match (m//) at /usr/share/sympa/lib/Sympa/Scenario.pm line 1164.` HOT 3
- Amazon Linux 2023 Support for Sympa HOT 2
- Translation site https://translate.sympa.org/ no longer works HOT 2
- do you know what all the folders/file permissions/owners should be for alias address processing to work? (alias addresses not being created for new lists since the OS was updated)
- Some times moderators don't show up in moderator list unless they have a name set HOT 1
- Delete All Subscribers From List HOT 1
- How can I rebuild archives and get attachments with exact extensions? HOT 1
- log_socket_type parameter should allow host, port, timeout options HOT 1
- Prevent custom_header with accents HOT 1
- Incorrect "No bouncing members" on a large list with small number of bouncers
- Empty SMTP FROM for successful delivery notification message HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sympa.