Re: [Exim] lookup question

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Kelley Reynolds
CC: exim-users
New-Topics: [Exim] Sender callout verification for non-smtp routers
Subject: Re: [Exim] lookup question
On Tue, 28 Oct 2003, Kelley Reynolds wrote:

> mailman_transport transport failed: regular expression error in
> "-(w+)(+.*)?": nothing to repeat at offset 6


Well, that is an invalid regex. The + at offset six doesn't follow
anything that can be repeated.

> Now, that regex is a cut and paste of regex in the mailman howto
> portion, and it works if I replace the first lookup with just a string
> and take away the escaped double-quotes like so
>
> command = /home/foo/mailman/mail/mailman '${if def:local_part_suffix
> {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} {post}}' $local_part


Taking away the surrounding double quotes leaves \\ as \\ so that when
Exim expands it, you end up with \ which makes the regex

-(\w+)(\+.*)?

which is legal. So there's the problem.

With the double quotes, either (a) precede every \ with another \ or (b)
use the \N expansion feature to stop the characters in the regex from
being interpreted by the string expander.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book