On Thu, Oct 30, 2003 at 10:34:48AM +1100, Peter D. Gray wrote:
> I am moving from sendmail to exim and writing a config file. I use the
> sendmail generics feature to rewrite the local user part of addresses,
> both incoming and outgoing. I have got my exim config to do the same
> thing but the rule is a bit messy and I just want a few other
> eyes on it to tell me if my approach is sane.
> The rewrite rule is
> # If they are generic domains, rewrite local part
>
> *@* "${if eq
> {${lookup{$domain}lsearch{GENERIC_DOMAINS}{OK}fail}}{OK}\
> {${lookup{$local_part}dbm{GENERIC_MAP}{$value}fail}@$domain}fail}" Eh
[...]
In exim4 rewrite patterns are address-lists, so something like this
might work, while being more readable:
*@lsearch;GENERIC_DOMAINS \
${lookup{$local_part}dbm{GENERIC_MAP}{$value}fail}@$domain Eh
cu and- untested -reas
PS: cdb instead of dbm might be faster.
PPS: exim -brw
--
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"