Re: [Exim] How to use domain lists in regular expressions in…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Andreas Metzler
Datum:  
To: exim-users
Betreff: Re: [Exim] How to use domain lists in regular expressions in domain lists
On Mon, Nov 03, 2003 at 07:16:46PM +0100, Marc Haber wrote:
> I would like to have a rewriting rule like


> ^foo\+([^-]+)@+local_domains foo+$primary_hostname-$1@$domain Tt


> To say it in prose, I would like the following rewrites to happen


> foo+bar@??? => foo+host.example-bar@???
> foo+bar-baz@??? => foo+bar-baz@??? (untouched)


> But I don't seem to be able to get the syntax right. exim complains
> "nothing to repeat at offset x", while the offset number points to the
> + of the domain list. Writing \+ does not help.

[...]

Afaict from the docs it does not work that way, you can either have a
regex matching the hole address, or match the domain against
domain-lists.

I think you'll need to use match *@+local_domains and use a fancy
expansion as replacement-pattern that returns forced failure if
^foo\+([^-]+) does not match $local_part and the replacement-pattern
you want to have otherwise.
              cu andreas