@ -63,7 +63,7 @@ class rcube_sieve_engine
1 => 'notifyimportancehigh'
);
const VERSION = '8.2 ';
const VERSION = '8.3 ';
const PROGNAME = 'Roundcube (Managesieve)';
const PORT = 4190;
@ -1394,19 +1394,21 @@ class rcube_sieve_engine
}
if (isset($rule['test'])) {
if (in_array($rule['test'], array('header', 'address', 'envelope'))
& & !is_array($rule['arg1'])
& & ($header = strtolower($rule['arg1']))
& & isset($this->headers[$header])
) {
$test = $header;
if (in_array($rule['test'], array('header', 'address', 'envelope'))) {
if (is_array($rule['arg1']) & & count($rule['arg1']) == 1) {
$rule['arg1'] = $rule['arg1'][0];
}
$matches = ($header = strtolower($rule['arg1'])) & & isset($this->headers[$header]);
$test = $matches ? $header : '...';
}
else if ($rule['test'] == 'exists'
& & !is_array($rule['arg'])
& & ($header = strtolower($rule['arg']))
& & isset($this->headers[$header])
) {
$test = $header;
else if ($rule['test'] == 'exists') {
if (is_array($rule['arg']) & & count($rule['arg']) == 1) {
$rule['arg'] = $rule['arg'][0];
}
$matches = ($header = strtolower($rule['arg'])) & & isset($this->headers[$header]);
$test = $matches ? $header : '...';
}
else if (in_array($rule['test'], array('size', 'body', 'date', 'currentdate'))) {
$test = $rule['test'];