Subject: | patch for list_accept |
list_accept doesn't quite work with maildirs. I'm using Courier maildirs and the following list_accept:
sub list_accept {
my $self = shift;
my $dir = shift;
$dir ||= $DEFAULT_DIR;
my $list = new Mail::ListDetector($self->{obj});
if (!(defined $list)) {
return 0;
} else {
my $name = $list->listname;
$name =~ tr/A-Za-z0-9_-//dc;
my $deliver_filename;
if($self->mbox_or_maildir($dir) eq 'maildir') {
$deliver_filename = "$dir/.$name/"; # Force to maildir
} else {
$deliver_filename = join '/', $dir, $name;
}
$self->accept($deliver_filename);
return $deliver_filename;
}
}