Page 1 of 1

Rules "or" and "and" together

Posted: 2013-07-10 12:21
by odseg
Good day, i use hmail 5.3, i use many rules and & or , this called one question, is it possible to do use rules "or" and "and" together?
for example: field subject contain some word "OR" body contain some word "AND" field "to" contain some address

sorry for my English

Re: Rules "or" and "and" together

Posted: 2014-08-03 23:58
by jimimaseye
I agree. Would be useful. But would be difficult i think.

Re: Rules "or" and "and" together

Posted: 2014-08-04 00:18
by ^DooM^
Yes i have needed this a few times. Normally just turn to scripting if you need more advanced rules.

Re: Rules "or" and "and" together

Posted: 2014-08-04 16:28
by SorenR
I split them into two rules, first rule create a custom header value and second rule check for the header value and the remaining criterias.

Re: Rules "or" and "and" together

Posted: 2015-03-12 12:11
by jimimaseye
REGEX is a beauty for helping out in these situations.

EG,

Where

RETURN PATH EQ axp.fraudite.com

and

TO contains USER1
or
TO contains USER2


could be written as

RETURN PATH EQ axp.fraudite.com
and
TO regex (?i:^.*(USER1@|USER2@).*$)


Regex can do CONTAIN, NOT CONTAINS(using the asterix), EQUALS, NOT EQUALS (removing the asterix) - but not sure how to do 'Greater Than' etc - im no expert.

(Admitedly, though, you cant do where IF FIELD1=xxx and (Field2=yyy or Field3=zzz). So I too am still up for the ability to do so if it happens.