2 # Copyright (C) 1999,2003 Ian Jackson
4 # This is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with userv-utils; if not, write to the Free Software
16 # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 open(CONF
,"$ARGV[0]") or die $!;
25 next if m/^\#/ || !m/^\S/;
26 next if m/^(myfqdn|xref|server|server-nosearch|fetch|read|post|permit|believe|extrarc)\s/;
27 if (m/^minreaddays\s+(\d+)\s+$/) {
29 } elsif (m/^maxperuser\s+(\d+)\s+$/) {
37 exit 0 if -l
$newsrc || ! -f _
|| -M _
> $minreaddays;
41 open NEWSRC
, $newsrc or die $!;
43 next unless s/:.*\n$//;
44 next unless m/^[-a-z0-9+]+\.[-a-z0-9+._]+$/i;
47 close NEWSRC
or die $!;
49 exit 0 if @g > $maxperuser;
51 print sort @g or die $!;
52 close STDOUT
or die $!;