use warnings;
use strict;
+use lib qw(/srv/bugs.debian.org/scripts);
+
use threads;
use threads::shared;
return if $spamscan_stop;
my ($sain, $saout);
- my $pid = open2($saout, $sain, "/usr/lib/debbugs/spamscan-sa");
+ my $pid = open2($saout, $sain, "/srv/bugs.debian.org/scripts/spamscan-sa");
lprint "{$mytid} forked $pid\n";
my $messages_handled=0;
pp: until ($spamscan_stop) {
last;
}
my @i;
- opendir DIR, 'incoming' or die "opendir incoming: $!";
- while (defined($_ = readdir DIR)) {
+ opendir my $dir, 'incoming' or die "opendir incoming: $!";
+ while (defined($_ = readdir $dir)) {
push @i, $1 if /^S(.*)/;
}
+ close $dir;
unless (@i) {
lprint "No more spam to process\n";
last;