Using internal Sieve notation
Introduction
WebMail Pro is able to work with ManageSieve agent to create and edit rules for filters, autoresponders and forwarding. However, currently it isn't able to perform parsing of the actual Sieve rules, those may get extremely complicated and the product only supports a small subset of Sieve features, especially pertaining to Filters.
When the filter is created by WebMail Pro, in addition to Sieve rules, information about the rule is added to the sieve script file, it looks like a comment of the following kind:
#sieve_filter:1;0;0;test_sieve;3;test1
Thus, if the filter is created by some other product, i.e. Roundcube, it will not be recognized by WebMail Pro as it needs comments in this internal notation. Using the guidelines below, you can adjust the rules to make WebMail Pro understand those.
Filters
The above example of the internal notation denotes a filter, which in the web interface would look like:
#sieve filter
#sieve_filter:
//Filter enabled ? 1 : 0
;
//Filter condition
// ContainSubstring = 0;
// ContainExactPhrase = 1;
// NotContainSubstring = 2;
;
//Filter field
// From = 0;
// To = 1;
// Subject = 2;
;
//Filter value
;
//Filter action
// DeleteFromServerImmediately = 1;
// MoveToFolder = 3;
;
//Filter Folder full name
// if Filter action == DeleteFromServerImmediately
Example: #sieve_filter:1;0;0;test_sieve;3;test
#end sieve filter
Autoresponders and Forwarding
In both Autoresponder and Forwarding rules, the same notation is used, for example:
#data=1~dGVzdCBzdWJqZWN0AHRlc3QgbWVzc2FnZQ==
The record consist of 3 elements:
- 1 for enabled, 0 for disabled;
- "~" separator;
- base64-encoded value which holds email address for Forwarding, or
$Subject."\x0".$Message
for Autoresponder.