Autor: Peter Velan Datum: To: exim-users Betreff: Re: [exim] Regex
am 16.12.04 23:54 schrieb Alan J. Flavell:
>> On Thu, 16 Dec 2004, Peter Velan wrote:
>>
>
>>>> So i tried something like
>>>>
>>>> (?i)\scialis\s
>
>>
>> You might find that \b is a better escape for this kind of matching
Oh yes, you're right. A word boundary is a better choice, indeed.
>>>> Pcretest says ok and matches caseless "cialis" surrounded by
>>>> whitespace. In the exim regex line this term doesn't matches. What
>>>> I'm doing wrong?
>
>>
>> We haven't seen this thing in context yet!
It's a part of my acl_smtp_data (now with the better \b escapes):
warn
message = X-ACL-Warn: Message with bad term (= $regex_match_string).
regex = \n(?i)\bviagra\b\N : \N(?i)\bcialis\b\N : \N(?i)\btadalafil\b\N
logwrite = :main: MSG_D04_REGEX1 (= $regex_match_string).
Yes, now it does work! (I will "repair" the other terms es well).
>>>> Should I enclose the term with a pair of "\N"?
>
>>
>> It would be my first try to fix it, yes.
>>
>> The inevitable question would be "what happened when you tried it"?
The X-ACL-Warn header was not added to the message.
>> Run the thing manually against exim, and see what it says (with
>> debugging if necessary), before putting it into production.