Pigeonhole implicit keep gets unfiltered message

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Pigeonhole implicit keep gets unfiltered message

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?

# Adam


--
Adam Weinberger
[hidden email]
http://www.adamw.org

Reply | Threaded
Open this post in threaded view
|

Re: Pigeonhole implicit keep gets unfiltered message

Stephan Bosch-2
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?

Regards,

Stephan.
Reply | Threaded
Open this post in threaded view
|

Re: Pigeonhole implicit keep gets unfiltered message

Adam Weinberger
> On 21 Dec, 2017, at 14:37, Stephan Bosch <[hidden email]> 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
[hidden email]
http://www.adamw.org

Reply | Threaded
Open this post in threaded view
|

Re: Pigeonhole implicit keep gets unfiltered message

Stephan Bosch-2
Op 12/22/2017 om 3:43 AM schreef Adam Weinberger:

>> On 21 Dec, 2017, at 14:37, Stephan Bosch <[hidden email]> 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.

What version is this? Please provide full config from `dovecot -n`.

Regards,

Stephan.

Reply | Threaded
Open this post in threaded view
|

Re: Pigeonhole implicit keep gets unfiltered message

Adam Weinberger
>> (2017/12/23 @ 1051 EST): Stephan Bosch said, in 2.0K: <<
> Op 12/22/2017 om 3:43 AM schreef Adam Weinberger:
> >> On 21 Dec, 2017, at 14:37, Stephan Bosch <[hidden email]> 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.
>
> What version is this? Please provide full config from `dovecot -n`.
>
> Regards,
>
> Stephan.
>
>> end of "Re: Pigeonhole implicit keep gets unfiltered message" from Stephan Bosch <<

It's dovecot 2.2.33.2, and pigeonhole 0.4.21.

Here's my dovecot -n output:

# 2.2.33.2 (d6601f4ec): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: FreeBSD 11.1-RELEASE-p6 amd64  nullfs
auth_mechanisms = plain login
first_valid_gid = 1021
first_valid_uid = 1021
last_valid_gid = 1022
last_valid_uid = 1022
listen = imap.jail.apnoea.adamw.org
mail_location = mdbox:/mail/%u/mail
mail_plugins = " zlib virtual fts fts_lucene"
mail_prefetch_count = 5
mailbox_list_index = yes
mdbox_rotate_size = 10 M
namespace {
  location = virtual:/mail/%u/mail/virtual
  prefix = virtual/
  separator = /
}
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox FreeBSD {
    autoexpunge = 17 weeks
  }
  mailbox FreeBSD/TodaysCommits {
    autoexpunge = 2 days
  }
  mailbox FreeBSD/automation {
    autoexpunge = 1 days
  }
  mailbox FreeBSD/portmgr {
    autoexpunge = 26 weeks
  }
  mailbox FreeBSD/ports {
    autoexpunge = 12 weeks
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    autoexpunge = 30 days
    special_use = \Trash
  }
  mailbox spam/probably {
    autoexpunge = 30 days
  }
  mailbox spam/totally {
    autoexpunge = 5 days
  }
  mailbox spamtrap {
    autoexpunge = 30 days
  }
  mailbox uberspam {
    autoexpunge = 30 days
  }
  prefix =
  separator = /
}
passdb {
  args = scheme=BLF-CRYPT username_format=%u /path/to/userdb.passwd
  driver = passwd-file
}
plugin {
  fts = lucene
  fts_autoindex = yes
  fts_autoindex_max_recent_msgs = 25
  fts_lucene = whitespace_chars=@
  sieve = file:/scripts/sieve/%u.sieve;bindir=/mail/%u/sieve/
  sieve_extensions = +vnd.dovecot.pipe +vnd.dovecot.filter +editheader
  sieve_filter_bin_dir = /scripts/sieve/filter
  sieve_pipe_bin_dir = /scripts/sieve/pipe
  sieve_plugins = sieve_extprograms
}
protocols = imap lmtp
service imap-login {
  inet_listener imaps {
    port = 0
  }
}
service lmtp {
  inet_listener lmtp {
    port = 24
  }
}
ssl = required
ssl_cert = </path/to/fullchain.pem
ssl_cipher_list = TLSv1.2+AEAD:!aNULL
ssl_dh_parameters_length = 4096
ssl_key =  # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
ssl_protocols = TLSv1.2
userdb {
  args = username_format=%u /path/to/userdb.passwd
  driver = passwd-file
}
protocol lmtp {
  mail_plugins = " zlib virtual fts fts_lucene sieve"
}
protocol lda {
  mail_plugins = " zlib virtual fts fts_lucene sieve"
}
protocol imap {
  mail_max_userip_connections = 20
  mail_plugins = " zlib virtual fts fts_lucene imap_zlib"
}

--
Adam Weinberger
[hidden email]
http://www.adamw.org