[patch] mailscanner does not erase input spool per-message log files when using exim
Julian Field
mailscanner at ecs.soton.ac.uk
Tue Jan 13 21:43:35 GMT 2004
All looks good except for in EximDiskStore.pm you forgot a couple of lines
that need changing:
@DeletesPending = ($this->{hpath}, $this->{dpath});
needs changing to
@DeletesPending = ($this->{hpath}, $this->{dpath}, $this->{lpath});
or else the lpath file won't be deleted if the MailScanner child process
receives a SIGHUP or a SIGTERM while it is in the middle of deleting a message.
Thanks for the patch!
At 21:22 13/01/2004, you wrote:
>Package: mailscanner
>Version: 4.25-14
>
>The /var/spool/exim4_input/msglog keeps growing ...
>
>diff -ur lib/MailScanner.old/Exim.pm lib/MailScanner/Exim.pm
>--- lib/MailScanner.old/Exim.pm 2003-11-26 17:35:29.000000000 +0100
>+++ lib/MailScanner/Exim.pm 2003-12-23 21:47:10.000000000 +0100
>@@ -238,6 +238,11 @@
> # return "$global::sed -e '1d' \"$dfile\" | $global::cat \"$hfile\" -";
> # }
>
>+sub LFileName {
>+ my($this, $id) = @_;
>+ return "../msglog/$id";
>+}
>+
> sub ReadQf {
> my($this, $message) = @_;
>
>diff -ur lib/MailScanner.old/EximDiskStore.pm lib/MailScanner/EximDiskStore.pm
>--- lib/MailScanner.old/EximDiskStore.pm 2003-11-07
>13:41:40.000000000 +0100
>+++ lib/MailScanner/EximDiskStore.pm 2003-12-24 13:08:33.000000000 +0100
>@@ -88,9 +88,11 @@
> $this->{dname} = $mta->DFileName($id);
> $this->{hname} = $mta->HFileName($id);
> $this->{tname} = $mta->TFileName($id);
>+ $this->{lname} = $mta->LFileName($id);
>
> $this->{dpath} = $dir . '/' . $this->{dname};
> $this->{hpath} = $dir . '/' . $this->{hname};
>+ $this->{lpath} = $dir . '/' . $this->{lname};
>
> $this->{inhhandle} = new FileHandle;
> $this->{indhandle} = new FileHandle;
>@@ -154,7 +156,7 @@
>
> unlink($this->{hpath});
> unlink($this->{dpath});
>-
>+ unlink($this->{lpath});
> # Clear list of pending deletes
> @DeletesPending = ();
> }
>@@ -193,6 +195,9 @@
> # while we unlink and unlock both, then locks the FD it
> # has for the open (but unlinked) -D file??
> # What happens if we do the same?
>+
>+ # print STDERR "Log da menssagem " . $this->{lpath} . "\n";
>+ unlink($this->{lpath});
>
> # Clear list of pending deletes
> @DeletesPending = ();
--
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
More information about the MailScanner
mailing list