On Sun, 7 Jan 2001 13:07:10 -0000 "Paul Miles" wrote:
> Hi All,
> I currently have a series of rewriting rules written directly into exim's
> configuration file. I would like to farm these out to a (series) of text
> files.
> The first type of rewriting rule catches individual users at some domain and
> rewrites it. There will also usually be a catch all rewriting rule.
> work@??? simon@??? Tbc
> *@domain1.com simon@??? Tbc
> The second type of rewriting is just a direct domain substitution. ie.
> *@domain2 $1@??? Tbc
^(?:[^@]+)@(?:domain1|domain2)\.com$ \
${expand:${lookup{$local_part@$domain}partial-lsearch*@{/path/to/your/file}{$value}fail} \
Tbc
with the file containing lines like:
# for your type 1 rewriting rule
alias1@???: real1@???
alias2@???: real1@???
*@domain1.com: real1@???
# for your type 2 rewriting rule
*@domain1.com: ${local_part}@???
Of course you can do more than just that.
You could also split your 2 rewriting rules types and replace the
regexp with your simpler strings. The nice thing about exim is
that many times you have many ways to do what you want.
HTH.
Bernard Stern, SWITCH
____________S_W_I_T_CH___Swiss Academic_______________________________________
mail: SWITCH Head Office a Tel: +41 1 268 1520
Limmatquai 138 n Fax: +41 1 268 1568
CH-8001 Zurich d e-mail: stern@???
________________________________________Reseach Network_______________________