Pigeonhole implicit keep gets unfiltered message
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 adamw@adamw.org http://www.adamw.org
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.
On 21 Dec, 2017, at 14:37, Stephan Bosch stephan@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 adamw@adamw.org http://www.adamw.org
Op 12/22/2017 om 3:43 AM schreef Adam Weinberger:
On 21 Dec, 2017, at 14:37, Stephan Bosch stephan@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.
What version is this? Please provide full config from dovecot -n
.
Regards,
Stephan.
(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 stephan@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.
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 =
-- Adam Weinberger adamw@adamw.org http://www.adamw.org
participants (2)
-
Adam Weinberger
-
Stephan Bosch