# Copyright (c) 2008 David Bremner <bremner@unb.ca>
# This file is distributed under the Artistic License/GPL2+
+use Email::FolderType qw(folder_type);
use Email::MIME;
package Email::MIMEFolder;
use base 'Email::Folder';
package IkiWiki::Plugin::mailbox;
-use Email::FolderType qw(folder_type);
use IkiWiki 2.00;
use Email::Thread;
use CGI 'escapeHTML';
hook(type => "preprocess", id => "mailbox", call => \&preprocess);
hook(type => "scan", id => "mailbox", call => \&scan);
hook(type => "pagetemplate", id=>"mailbox", call => \&pagetemplate);
+ IkiWiki::loadplugin("filecheck");
} # }}}
sub scan(@){
$template->param(HEADERS=>[@headers]);
+ my $filter=$params{filter} || "maxsize(100k) and mimetype(text/plain)";
+ my @good_parts=filter_parts($filter,$message->parts;
my $body= join("\n", map { $_->body } $message->parts);