No rule activation on validated RegEx

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Kob
New user
New user
Posts: 15
Joined: 2005-10-01 13:02

No rule activation on validated RegEx

Postby Kob » 2007-11-07 23:01

Hi,

I am trying to delete all incoming mail where the "To:" field contains a formal format of a first name, middle initial and last name. I built a regex that passed the validation in http://www.dotnetcoders.com/web/Learnin ... ester.aspx on the provided test case below, but messages still pass through. Any hint where to look would be appreciated. I am using hMailServer V.4.3.1- B253.

Details:

My regex is: "[\w]+\s[A-Z]\.\s[\w]+"

A test mail that passes through:
To: "Puke Z. Scumbag" <office_1@freaky-dummy.com>

I have 2 other rules before this regex one, but they only delete mail on some keyword findings using the "contains" search type.

User avatar
martin
Developer
Developer
Posts: 6712
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Postby martin » 2007-11-07 23:05

I built a regex that passed the validation in http://www.dotnetcoders.com/web/Learnin ... ester.aspx on the provided test case below, but messages still pass through.


It passes the validation but it doesn't match the complete field properly. If you go to the page and click "Matches" you see that it's only a partial match. A full match is needed..

Kob
New user
New user
Posts: 15
Joined: 2005-10-01 13:02

Postby Kob » 2007-11-08 00:00

I appreciate the help, Martin.
I did a full line match by using "[\w]+\s[A-Z]\.\s[\w]+".*$ and it worked.

Thanks.


Return to “General discussions”



Who is online

Users browsing this forum: No registered users and 3 guests