Re: [Exim] rewriting ".." -> "/" problem

Top Page
Delete this message
Reply to this message
Author: John Horne
Date:  
To: exim-users
Subject: Re: [Exim] rewriting ".." -> "/" problem
On 07-May-2002 at 16:17:24 Matt Bernstein wrote:
> At 18:10 +0200 Phil Pennock wrote:
>>On 2002-05-07 at 16:58 +0100, Matt Bernstein wrote:
>>> I want to rewrite x..y@??? to x/y@??? with a rule
>>> like..
>>>
>>> *..*@REAL_DOMAIN    $1/$2@REAL_DOMAIN       Tbct

>>>
>>> ..but running through exim -d -bv gives me this:
>>>
>>> address match: subject=a..b@??? pattern=*..*@dcs.qmul.ac.uk
>>> a..b@??? in "*..*@dcs.qmul.ac.uk"? no (end of list)
>>
>>Is that use of ".*" on the LHS triggering a switch to use of regular
>>expressions?
>>
>>If you use:
>> (.*)\.\.(.*)@REAL_DOMAIN    $1/$2@REAL_DOMAIN    Tbct
>>does that help?

>
> No, sadly. (I had had a play with regexes too.)
>

No, if it begins with a '^' then it is recognised as a regexp (page 181;
line 1 of the manual, which refers you back to address lists). I would say
try doing it with a regexp such as:

   ^(.+)\.\.(.+)@REAL_DOMAIN$    $1/$2@REAL_DOMAIN       Tbct


If both 'x' and 'y' won't contain any dots themselves then you could try:

   ^([^.]+)\.\.([^.]+)@REAL_DOMAIN$    $1/$2@REAL_DOMAIN       Tbct




Regards,

John.

------------------------------------------------------------------------
John Horne, University of Plymouth, UK           Tel: +44 (0)1752 233914
E-mail: jhorne@???
PGP key available from public key servers