On 19 Jan, 2018, at 4:39, Aki Tuomi <aki.tu...@dovecot.fi> wrote:



On 19.01.2018 04:35, Adam Weinberger wrote:
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
ad...@adamw.org
http://www.adamw.org
It might work better with

exec /usr/local/bin/bogofilter -p -e -c /path/to/bogofilter.cf

Aki

Thank you! While that didn't fix the problem, it did clue me into trying just "cat /dev/stdin" to conclude that it's bogofilter that's misbehaving.

# Adam


--
Adam Weinberger
ad...@adamw.org
http://www.adamw.org


Reply via email to