about summary refs log tree commit homepage
path: root/public-inbox-mda
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-05-02 20:28:43 +0000
committerEric Wong <e@80x24.org>2014-05-02 21:06:47 +0000
commit63ede74cfe5817642a4211419ae2bd3838260237 (patch)
tree19d79db91b59eefbed9474c03b6eb5bbbcda1ce6 /public-inbox-mda
parent85f6a372e8bea0b64ff7740c73c7d478fad201c4 (diff)
downloadpublic-inbox-63ede74cfe5817642a4211419ae2bd3838260237.tar.gz
This should reduce data copies and memory usage, according
to Email::Simple documentation.
Diffstat (limited to 'public-inbox-mda')
-rwxr-xr-xpublic-inbox-mda4
1 files changed, 2 insertions, 2 deletions
diff --git a/public-inbox-mda b/public-inbox-mda
index 096421bb..522eeff7 100755
--- a/public-inbox-mda
+++ b/public-inbox-mda
@@ -34,14 +34,14 @@ my $filtered; # string dest
 if (PublicInbox::MDA->precheck($filter, $dst->{address}) &&
     do_spamc($filter->simple, \$filtered)) {
         # update our message with SA headers (in case our filter rejects it)
-        my $msg = Email::Simple->new($filtered);
+        my $msg = Email::MIME->new(\$filtered);
         $filtered = undef;
         $filter->simple($msg);
 
         if (PublicInbox::Filter->run($msg)) {
                 # run spamc again on the HTML-free message
                 if (do_spamc($msg, \$filtered)) {
-                        $msg = Email::MIME->new($filtered);
+                        $msg = Email::MIME->new(\$filtered);
                         PublicInbox::MDA->set_list_headers($msg, $dst);
                         $filter->simple($msg);