[patch] mailscanner does not erase input spool per-message log files when using exim
Matthias Klose
doko at CS.TU-BERLIN.DE
Tue Jan 13 21:22:52 GMT 2004
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 = ();
More information about the MailScanner
mailing list