Re: [Exim] SMTP rewriting (again)

Pàgina inicial
Delete this message
Reply to this message
Autor: John Horne
Data:  
A: exim-users
Assumpte: Re: [Exim] SMTP rewriting (again)
On Tue, 2004-03-02 at 17:05, Philip Hazel wrote:
> On Tue, 2 Mar 2004, John Horne wrote:
>
> > However, is there a way to get
> > the original address regardless of what it is? I see that
> > $smtp_command_argument is not mentioned as being valid for the MAIL
> > command so I can't use that.
>
> You can match it in the regex! Put the whole regex inside () and voila!
> you will find the original thing in $1.
>

But that is (almost) what I had and it didn't work - I used:

\N^<?([^@<>]+)>?$\N

Okay so the <> are left out. But even if I include them I get an error
(using a local part of 'fred'):

LOG: Rewrite of fred yielded unparseable address: no local part in
address @plynms01.net.plymouth.ac.uk

As far as I can tell the 'match' condition is probably resetting $1 so I
lose the original address. If I change the rewrite rule to use $0
instead of $1 then I get the matched string '.net.plymouth.ac.uk' stuck
in as a local part. That makes sense if 'match' is setting/resetting the
$0, $1 etc.


John.

--
---------------------------------------------------------------
John Horne, University of Plymouth, UK  Tel: +44 (0)1752 233914
E-mail: John.Horne@???       Fax: +44 (0)1752 233839