Subject: | Accept to a maildir with bad headers |
Date: | Thu, 10 Aug 2006 15:14:11 +0100 (BST) |
To: | bug-Mail-ListDetector [...] rt.cpan.org |
From: | Peter Oliver <p.d.oliver [...] mavit.freeserve.co.uk> |
If a incoming message contains a spurious mailing list header, say
X-Mailman-Version: 2.0.1
but nothing further to identify the list name, then list_accept will put
the message into a maildir. The following patch against
Mail/Audit/List.pm causes list_accept to not accept such messages.
--- List.pm~ 2006-07-16 21:16:31.000000000 +0100
+++ List.pm 2006-08-10 15:08:59.000000000 +0100
@@ -24,6 +26,7 @@
my $name = $list->listname;
$name =~ tr/A-Za-z0-9_-//dc;
$name = $arg->{munge_name}->($name) if $arg->{munge_name};
+ return 0 unless $name;
my $deliver_filename = join '/', $dir, $name;
$self->accept($deliver_filename);
return $deliver_filename;
--
Peter Oliver