Discussion:
storing messages - SOLVED
Alessandro Dentella
2013-05-29 09:12:05 UTC
Permalink
1. Selinux. Put in permissive and then build custom policies. Return to
enforcing.
2. MailScanner Run As and directory ownership and permissions.
3. MailScanner store messages as user matches permissions.
4. Making sure you add the -U option to MailScanner for the newer versions of
perl.?
sed -i 's:#!/usr/bin/perl -I:#!/usr/bin/perl -U -I:g' /usr/sbin/MailScanner
I understood that the problem was that the reported function was in the
comment to the line

# next unless $message->{infected};

I don't really know why that was there, but in fact was the result of
applying an old patch.

Thanks for the support tothe list

sandro
*:-)


sub RemoveInfectedSpam {
my $this = shift;

my($id, $message);

while(($id, $message) = each %{$this->{messages}}) {
#print STDERR "Message is infected\n" if $message->{infected};
# next unless $message->{infected};
next unless
MailScanner::Config::Value('keepspamarchiveclean', $message) =~ /1/;
#print STDERR "Deleting " . join(',',@{$message->{spamarchive}}) . "\n";
# unlink @{$message->{spamarchive}}; # Wipe the spamarchive files <<<<< this deletes
@{$this->{spamarchive}} = (); # Wipe the spamarchive array
}
}

Loading...