Author Topic: managesieve plugin: using rules with value comparisons  (Read 251 times)

Offline stefannagy

  • Newbie
  • *
  • Posts: 1
managesieve plugin: using rules with value comparisons
« on: March 07, 2024, 05:49:39 AM »
Hello,

I'm using Debian Bookworm, so that's Roundcube 1.6.5 now. I use the managesieve plugin to filter messages and in general it works. However, I have a question regarding the creation of rules with value comparisons in Roundcube:

Exim4 adds a header X-Spam_score with a the spam score of the message (multiplied by ten, as an integer value) and I want to use this value to filter spam messages. I attach a screenshot of the rule I created in Roundcube ("screenshot.png"), it results in the following:

# rule:[Spam-Filter]
if allof (header :value "gt" "x-spam_score" "60")
{
   fileinto "Junk";
}


This filter doesn't work. As I understand it this leads to a comparison between strings. And everywhere I look I find sieve scripts using a sieve extension comparator-i;ascii-numeric which is required to be able to use a :comparator "i;ascii-numeric", so that those strings are interpreted as decimal positive integers… Since Roundcube offers comparisions between values I guess it should be possible without this extension… :/ What am I doing wrong?
« Last Edit: March 07, 2024, 06:09:20 AM by stefannagy »