Forum

Share

Please consider registering
guest

Log In RegisterMembers
Or log in with

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Regex Syntax
April 8, 2010
6:52 am
USA
Member
Forum Posts: 6
Member Since:
May 14, 2009
Offline

RKent,

Is there something wrong with this syntax I'm using -> from:/\.dell\.com/

I have this in a rule for like so [Header Regex Match] [matches] [from:/\.dell\.com]

I received mail from Dell@dellhome.usa.dell.com and the action to move the mail to another folder doesn't occur.

If I just do a straight match: [From] [contains] [.dell.com] to move action works as expected.

Please advise…

Max

Share
Green just makes sense.
April 8, 2010
7:34 am
Admin
Forum Posts: 323
Member Since:
July 12, 2008
Offline

There are several different issues here.

First, the Header Regex search term is matching properties of the internal message database, not headers in the original email. They are not necessarily the same. In this particular case, the internal field is called "sender", not "from". Its value is the best available value for the sender in the program. Although it prefers the "From" header, if that is missing it will use substitutes such as "Reply-to". So this is one of the more complex cases.

Second, in a regular expression the "." is a special character that matches any character, so your expression would match dellRcom as well as dell.com

I tested your desired term, and it worked for me when I used: sender:/.caspia.com/  For your case, I think what you really want though is sender:/\.dell\.com/ to only match the "." and not any character.

Share
April 9, 2010
4:19 am
USA
Member
Forum Posts: 6
Member Since:
May 14, 2009
Offline

Hi RKent,

Thanks for the pointer in the direction of "Sender" versus "From".  I'll give that a shot. 

By the way, I had included the backslashes in my post preceding the dots in the regular expression, but they were removed when I submitted the post.  Embarassed  I do understand that the special meaning of the dot has to be removed by using the backslashes.   It was the "header" and the "internal message database" that was the piece of the puzzle I wasn't taking into account.  On that subject, you refer to this fact briefly in the filtaquilla documentation.  Is there a complete reference as to the relationship between the message headers and internal message database that I can use for future reference in creating regular expressions with filtaquilla?

Thanks again.

Max

Share
Green just makes sense.
April 9, 2010
11:54 am
Admin
Forum Posts: 323
Member Since:
July 12, 2008
Offline

I do not know of a reference for this information. I went to the base code to confirm what I told you. Documentation would be a good project I agree. Maybe I should add a few more comments about that in mh own FiltaQuilla documentation.

I guess I had expected the most common usage to be for a custom header, and in that case the header name (added with the customdbheaders preference) does match the database value.

Share
Forum Timezone: UTC -8

Most Users Ever Online: 18

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

bobkatz: 8

BigMike: 8

t2m: 7

zabolyx: 7

taa: 6

onlyme: 6

Member Stats:

Guest Posters: 130

Members: 565

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 7

Topics: 231

Posts: 802

Moderators: rkent (323)

Administrators: rkent (323)