> On 30 May 2017, at 3:47 pm, rolelael <robby.vanmieg...@gmail.com> wrote:
> 
> Hello
> 
> I'm trying to accomplish the following :
> 
> If the return-path is <> ( empty ) then do the following ;
> 
> if domain is robbya.be or robbyb.be route via mailrobby.test.com ; if domain
> is robbyc.be then route via mailrobby2.test.com
> 
> if /^Return-Path:\s**$/
> /(^From:.*robbya\.be|^From:.*robbyb\.be)/ FILTER smtp:[mailrobby.test.com]
> /^From:.*robbyc\.be/ FILTER smtp:[mailrobby2.test.com]
> endif
> 
> This works but throws a warning :
> 
> /cleanup[64212]: warning: pcre map /etc/xxx/mime_header_checks, line 1:
> error in regex at offset 16: nothing to repeat

This tells you about the error in your regexp, as your colleague pointed out. 
As a result…

> /cleanup[64212]: warning: pcre map /etc/xxx/mime_header_checks, line 4:
> ignoring ENDIF without matching IF

…the entire ‘if’ statement seems to be ignored, so that when the endif is 
found, there is no matching ‘if’.  That means that the the two lines are 
_always_ triggered.  Have you tested with a message that should NOT trigger the 
condition?
> 
> If i change the s**$ to what a coleague tells me :-) --> s*$ then no
> warning, but both lines are not triggered. If i check for REGEXP it should
> be indeed s*$ I guess. But then it fails to trigger…

If the lines are not triggered with the corrected regexp, then the regexp is 
not matching.


--
Peter West
p...@pbw.id.au
“Do you believe at last?”

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to