Re: [Exim] [root@charlotte.intern.cats.ms: Bug#53140: direct…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Kai Henningsen
Dátum:  
Címzett: Philip Hazel
CC: exim-users
Tárgy: Re: [Exim] [root@charlotte.intern.cats.ms: Bug#53140: director suffix option problem]
On 23 Mar 2000, at 12:50, Philip Hazel wrote:

> On Thu, 23 Mar 2000, Kai Henningsen wrote:
>
> > $ perl -e '$x = "A terrible catastrophe\!"; $x =~ /cat|catastrophe/;
> > print "matched <$&>\n";'
> > matched <cat>
> > $
> >
> > Same as Perl, so nothing wrong as far as I can see.
>
> Indeed, but the point is it doesn't go for the longest match, but for
> the first match.


Right. I'm undecided if the Perl side of this is a problem. However,

> Just like     suffix = -* : .*


... have a look at this:
$ perl -e '$x = "bla-blubb.nix"; $x =~ /(\..*|-.*)$/; print "matched
<$&>\n";'
matched <-blubb.nix>
$

This does _not_ match the first; it does match the longest.

And as a bit of background (I don't remember if I gave that for the
original report), our situation is that (1) everything from the
Internet gets appended "-mailhost" by our external mail host (and
various "-something" by users for mail sorting), _and_ we recently
decided to support firstname.lastname by simply handling "." as an
extender just like "-" (given that with one exception (easily handled
by an alias), everyone's login already was firstname - small business
here, no duplicate first names).

Example from your mail:

> Return-path: <ph10@???>
> Envelope-to: kai.henningsen-carmen@???


(Incidentally, why does one use <> and not the other?)

Regards - Kai Henningsen

-- 
http://www.cats.ms
Spuentrup CTI       Fon: +49 700 CALL CATS (=22 55 22 87)
Windbreede 12       Fax: +49 251 322312 99
D-48157 Muenster    Mob: +49 161 322312 1
Germany             GSM: +49 171 7755060