pigeonhole: sieve: float score failed for comparator-i ascii-numeric
Hello
Following the sieve_spamtest_status_header from the document, I think I could extract the score from the spamassassin (which is from spampd lmtp).
But sieve script can't never work properly with comparator "i;ascii-numeric". I have used sieve-test several times, once I remove the dot from the mail sample, the sieve script works well.
I noticed that document says i;ascii-numeric is for unsigned integer only which certainly does work for this case. The score here would be signed float(all right all the float is signed) and it is a float variable from tst-spamvirustest.c.
I think that is the place the bug happened. Unfortunately, I didn't found any RFC that supports a float comparator and I am not familiar with the sieve interrupter. If someone could give me a possible method to fix this, I could submit a patch.
Sincerely
Randy Li
On 16/05/2023 20:43 EEST Randy Li via dovecot dovecot@dovecot.org wrote:
Hello
Following the sieve_spamtest_status_header from the document, I think I could extract the score from the spamassassin (which is from spampd lmtp).
But sieve script can't never work properly with comparator "i;ascii-numeric". I have used sieve-test several times, once I remove the dot from the mail sample, the sieve script works well.
I noticed that document says i;ascii-numeric is for unsigned integer only which certainly does work for this case. The score here would be signed float(all right all the float is signed) and it is a float variable from tst-spamvirustest.c.
I think that is the place the bug happened. Unfortunately, I didn't found any RFC that supports a float comparator and I am not familiar with the sieve interrupter. If someone could give me a possible method to fix this, I could submit a patch.
Sincerely
Randy Li
Would it be possible to amend your antivir/spam scanner to produce number or e.g. star based value instead?
Aki
On 2023/5/17 02:18, Aki Tuomi wrote:
On 16/05/2023 20:43 EEST Randy Li via dovecot dovecot@dovecot.org wrote:
Hello
Following the sieve_spamtest_status_header from the document, I think I could extract the score from the spamassassin (which is from spampd lmtp).
But sieve script can't never work properly with comparator "i;ascii-numeric". I have used sieve-test several times, once I remove the dot from the mail sample, the sieve script works well.
I noticed that document says i;ascii-numeric is for unsigned integer only which certainly does work for this case. The score here would be signed float(all right all the float is signed) and it is a float variable from tst-spamvirustest.c.
I think that is the place the bug happened. Unfortunately, I didn't found any RFC that supports a float comparator and I am not familiar with the sieve interrupter. If someone could give me a possible method to fix this, I could submit a patch.
Sincerely
Randy Li
Would it be possible to amend your antivir/spam scanner to produce number or e.g. star based value instead?
I am not sure it would work. ext_spamvirustest_parse_strlen_value() would pass a value back from its float argument.
I should read the sieve interrupter to figure an answer, if we could just convert that float variable to unsigned integer.
Aki
Sincerely
Randy Li
participants (2)
-
Aki Tuomi
-
Randy Li