Heiko Schlittermann <hs@schlittermann.de> (Do 25 Feb 2021 10:08:05 CET):
doveadm user *
returns the full user list only once. A 2nd invocation of the same command within a small timeframe returns a subset of the local users only (the
The following Perl script can reproduce the behaviour:
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
sub count {
my $n;
setpwent() or die("setpwent");
$n++ while getpwent();
# endpwent();
return $n;
}
say count();
say count();
If I miss the endpwent(), the first count retuns 400+ users, but the second one only about 30 (which matches the lines I've in the /etc/passwd file).
If I use the endpwent(), I always get 400+ users.
Su, I suspect, the unfortunate behaviour is on the dovecot side (in the auth processes)
What do you think?
Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
-- SCHLITTERMANN.de ---------------------------- internet & unix support - Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} - gnupg encrypted messages are welcome --------------- key ID: F69376CE -