PDFs getting mangled

Adam Weinberger adamw at adamw.org
Fri Jan 19 04:35:00 EET 2018


Since upgrading to 2.3.0 / 0.5.0.1, incoming PDFs are getting mangled.
It seems to be happening when I use vnd.dovecot.filter. When I comment
out the block, things come through fine.

My filter block looks like this:
       require "vnd.dovecot.filter";
       filter "bogofilter_filter";

        if header :contains "X-Bogosity" [
                "Spam, tests=bogofilter, spamicity=1.00",
                "Spam, tests=bogofilter, spamicity=0.99"
        ] {
            fileinto "spam/totally";
            stop;
        }
        elsif header :contains "X-Bogosity" "Spam," {
            fileinto "spam/probably";
            stop;
        }
        elsif header :contains "X-Bogosity" "Unsure," {
            fileinto "spam/maybe";
            stop;
        }

filter/bogofilter_filter looks like this:
        #!/bin/sh
        cat /dev/stdin | /usr/local/bin/bogofilter -p -e -c /path/to/bogofilter.cf

Images seem to come through fine. I didn't have this problem before the
upgrade. It could easily be a problem with bogofilter, but I figured
that I'd check here first to see if anybody else has an
attachment-mangling issue with vnd.dovecot.filter.

# Adam


--
Adam Weinberger
adamw at adamw.org
http://www.adamw.org


More information about the dovecot mailing list