Sieve fails with match type "matches" if the string to match contains backslashes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all,

I have a problem with Cyrus 3.0.8 and its Sieve implementation. I regularly get incoming messages with the following literal subject line:

[The job succeeded.] SQL Server Job System: 'Sicherung Mercator.Sicherung' completed on \\GARAK.

I would like Sieve to sort these messages into a subfolder. This works in general. With the following Sieve script, the messages indeed are moved into the indicated subfolder as desired:

require "fileinto";
if header :is "subject" "[The job succeeded.] SQL Server Job System: 'Sicherung Mercator.Sicherung' completed on \\\\GARAK." {
  fileinto "INBOX/Health Reports/Garak: Backup: SQL Server";
}

It also works with the very same script if I replace ":is" by ":contains".

But as soon as I use ":matches" instead of ":is" or ":contains", it fails: It does not put the message into the subfolder any more, but puts it into INBOX.

Unfortunately, I actually have to use ":matches" instead of ":is" or ":contains"; please let's take this a matter of fact (the subject line shown above is just an example; actually, there are a lot of such messages with slight variations in the subject line).

I have tracked down the problem so far that I am sure that the backslashes are the problem. I have sent test messages with the very same subject, but without the backslashes, and have changed the Sieve script accordingly, and then it worked as expected with all match types, including ":matches".

IMHO, Cyrus' Sieve implementation violates RFC 5228 which clearly states that a literal backslash in any quoted string is represented by \\, that a literal quote in any quoted string is represented by \", and that \ should not occur in quoted strings, except in the aforementioned cases.

Now I would like to know whether

- the problem is due to my stupidity (read: what I am doing wrong?) (this is my first experience with Sieve)
- there is a workaround in Cyrus 3.0.8 (if it's not my stupidity)
- the issue has been fixed in later versions (if it's not my stupidity)

Thank you very much in advance, and best regards,

Binarus


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/Tdab9bf8491e4c407-M4b4a66659a8dcf1530924738
Delivery options: https://cyrus.topicbox.com/groups/info/subscription




[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux