On 21 Dec, 2017, at 14:37, Stephan Bosch <step...@rename-it.nl> wrote:

Op 12/19/2017 om 8:41 AM schreef Adam Weinberger:
I'm getting a behaviour with pigeonhole that I wasn't expecting. Am I
misunderstanding the design?

I run my messages through a vnd.dovecot.filter. It's essentially this:

filter "spam_filter";
if spamheaders {
    fileinto "spam";
    stop;
}

Mail stored in the spam folder is the filtered version, but the
implicit-keep message is the original, unfiltered message. If I add an
explicit `keep;` to the end, it stores the filtered version into my
inbox.

Based on the filter RFC, I was expecting the implicit keep to retain
the filtered version. Am I misinterpreting the spec?

I did a quick test, and I am not seeing any problems.

However, what is that spamheaders test in your script?

Hi Stephan,

The block looks like this:

        ### BOGOFILTER
        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;
        }

Bogofilter adds an X-Bogosity header. With the block as it is, when it hits the implicit keep the message has no X-Bogosity header. When I add 'keep;' to the end, it does have the header.

If it's just me, that's fine, as it's incredibly easy to work around.

# Adam


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

Reply via email to