I'm trying to strip off all third level domain
information from my local domains
host.domain.de -> domain.de
/etc/exim/localdomains:
domain.de
But since I have all my local domains in a file
I don't want to have to add a rewriting rule
by hand. Of course that would be just
*@*.domain.de $1@???
But I tried it this way:
*@* "$1@\
${lookup{\
${if match{$2} {^[^\\\\.]+(.*)\\$}\
{\
${if match{$2} {^[\\\\.]+(.*)\\$}\
{ here should be the result of the 2nd match,
but $1 doesn't work }
{ here should be the $2 before the match }
}\
}\
{$2}\
}\
} lsearch{/etc/exim/localdomains} {$value} {$2} }"
How do make it work?
Maybe there a better solution?
--
Torsten