On Tue, 2 Dec 1997, John Horne wrote:
> I have configured exim (I thought!) to freeze any message sent by the
> postmaster to any address with the prefix "uop-". This is done by the system
> filter. It is intended to allow University-wide messages to be sent to staff,
> students, etc, but not allowing the postmaster address to be forged. In
> effect the postmaster has to thaw the message before it will be sent.
>
> The director contains 'prefix="uop-"', and the system filter contains :
>
> if $recipients matches "\buop-" then freeze endif
>
> Now I'm sure this used to work since I tested it to some extent and asked the
Well, "\b" in a string is not a valid escape sequence for anything in
particular, so it turns into "b", and therefore the regular expression
you are using is in fact "buop-".
> I changed the "\b" to "\\b" (just in case, following
> my last mistake with backslashes), but this made no difference.
Unfortunately (?), strings in filter files are expanded. String
expansion *also* recognizes \ as an escape. So although the string is
now read in as \buop- expanding it once again turns it into buop- before
using it as a regular expression.
What you need is either
if $recipients matches \\buop- then freeze endif
(cutting out the quote interpretation of \) or
if $recipients matches "\\\\buop-" then freeze endif
I have stressed this more strongly in the new edition of the manual I am
working on.
--
Philip Hazel University Computing Service,
ph10@??? New Museums Site, Cambridge CB2 3QG,
P.Hazel@??? England. Phone: +44 1223 334714
--
*** Exim information can be found at
http://www.exim.org/ ***