storing messages - SOLVED

Alessandro Dentella sandro at e-den.it
Wed May 29 10:12:05 IST 2013


On Mon, May 27, 2013 at 09:10:10PM +0200, Jerry Benton wrote:
> These are the primary things I check for when dealing with this problem:
> 
> 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
  }
}



More information about the MailScanner mailing list