Release 4.62.7 beta

UxBoD uxbod at splatnix.net
Sun Jul 29 09:35:54 UTC 2007


Jules,

I changed the code too this which fixed the problem, but I do not understand why I needed the chmod?!??! It is the same code as what is used to create the <MESSAGE.ID>.header file :-

sub InitClamAVModParser {
  my($BaseDir, $batch) = @_;

  if (MailScanner::Config::Value('clamavspam')) {
    # Write the whole message into $id.message in the headers directory
    my($id, $message);
    while(($id, $message) = each %{$batch->{messages}}) {
      next if $message->{deleted};

      my $target = new FileHandle;
      my $filename = $global::MS->{work}->{dir} . '/' . $id . '.message';

      MailScanner::Lock::openlock($target, ">$filename", "w")
        or MailScanner::Log::DieLog("Cannot create + lock message file %s, %s", $filename, $!);
      $message->{store}->WriteEntireMessage($message, $target);

      MailScanner::Lock::unlockclose($target);

      # Set the owner of the message file
      chown $global::MS->{work}->{uid}, $global::MS->{work}->{gid}, $filename
      if $global::MS->{work}->{changeowner};
      chmod 0660, $filename;
    }
  }
}

I presume it is more efficient to use IO::File as nothing else should be accessing the .message file anyway, and therefore a lock is not required.  If that is the case, then would the same hold true for the header file?

Regards,

--[ UxBoD ]--
// PGP Key: "curl -s https://www.splatnix.net/uxbod.asc | gpg --import"
// Fingerprint: C759 8F52 1D17 B3C5 5854  36BD 1FB1 B02F 5DB5 687B
// Keyserver: www.keyserver.net Key-ID: 0x5DB5687B
// Phone: +44 845 869 2749 SIP Phone: uxbod at sip.splatnix.net

----- Original Message -----
From: "UxBoD" <uxbod at splatnix.net>
To: "MailScanner Beta-testers" <mailscanner-beta at lists.mailscanner.info>
Sent: 29 July 2007 10:19:47 o'clock (GMT) Europe/London
Subject: Re: Release 4.62.7 beta

Yeah perms does seem to be the problem.  I have changed the code to be the same as what Jules uses to create the .header file to see if that cures the problem.

Regards,

--[ UxBoD ]--
// PGP Key: "curl -s https://www.splatnix.net/uxbod.asc | gpg --import"
// Fingerprint: C759 8F52 1D17 B3C5 5854  36BD 1FB1 B02F 5DB5 687B
// Keyserver: www.keyserver.net Key-ID: 0x5DB5687B
// Phone: +44 845 869 2749 SIP Phone: uxbod at sip.splatnix.net

----- Original Message -----
From: "Glenn Steen" <glenn.steen at gmail.com>
To: "MailScanner Beta-testers" <mailscanner-beta at lists.mailscanner.info>
Sent: 29 July 2007 10:02:10 o'clock (GMT) Europe/London
Subject: Re: Release 4.62.7 beta

On 29/07/07, UxBoD <uxbod at splatnix.net> wrote:
> The file doesn't appear to even get created.
>
> Also, the reporting on infections appears to be incorrect aswell as shown below.  The message is actually clean :-
>
> Jul 29 09:01:33 mailhub MailScanner[2145]: New Batch: Scanning 1 messages, 3149 bytes
> Jul 29 09:01:37 mailhub MailScanner[2145]: Virus and Content Scanning: Starting
> Jul 29 09:01:37 mailhub MailScanner[2145]: ERROR:: UNKNOWN CLAMD RETURN ./35485178092.E26FC.message/Unable to open file or directory ERROR :: /var/spool/MailScanner/incoming/2145
> Jul 29 09:01:37 mailhub MailScanner[2145]: Virus Scanning: Clamd found 1 infections
> Jul 29 09:01:38 mailhub MailScanner[2145]: Virus Scanning: Nod32 found 1 infections
> Jul 29 09:01:38 mailhub MailScanner[2145]: Virus Scanning: Found 1 viruses
> Jul 29 09:01:38 mailhub MailScanner[2145]: Requeue: 35485178092.E26FC to 6FDD4178094
> Jul 29 09:01:38 mailhub postfix/qmgr[22696]: 6FDD4178094: from=<users-return-61884-uxbod=splatnix.net at spamassassin.apache.org>, size=2529, nrcpt=1 (queue active)
> Jul 29 09:01:38 mailhub MailScanner[2145]: Uninfected: Delivered 1 messages
> Jul 29 09:01:38 mailhub MailScanner[2145]: Logging message 35485178092.E26FC to SQL
>
>
> Regards,
>
Ok, looks a bit ... strange.... What do you have for incoming work dir
perms/user/group in MS, and how did you solve the clamd permission
"clash" with PF?
The error seems to be about the MS childs work dir not being ...
accessible... to the child. So .. does all messages exhibit this
problem or not?
I assume this all worked in the previous beta? I'd help check on my
testsystem, but I'm actually outdoors (well... actually am changing
some doors on the house... Rot hag gotten into them,,, Pretty far from
MailScanner:-).

Cheers
-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se
-- 
MailScanner-Beta mailing list
mailscanner-beta at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner-beta

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
MailScanner-Beta mailing list
mailscanner-beta at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner-beta

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the MailScanner-Beta mailing list