[EXIM] Rewrite rules

Top Page
Delete this message
Reply to this message
Author: Steve Sargent
Date:  
To: exim-users
Subject: [EXIM] Rewrite rules
I'm trying to do header rewriting as a two stage operation and can't get it
to work. Could anyone advise please.

I want to look the domain up in a file of domain names and use the returned
value as a part of the file name for the second lookup.

The rewrite rule is:-

*@lsearch;/usr/local/exim/tables/rewrite_domains \
     ${lookup{$local_part}lsearch{/usr/local/exim/tables/$value-aliases}\
                        {$value}fail}@???  Ffrs



rewrite_domains contains:-

qmwcc8.qmw.ac.uk:compserv


compserv-aliases contains:-

cgaa392:B.Harding



The test is this:-

rwt -brw cgaa392@???


And the result is this:-

1998-12-18 13:19:40 Expansion of
${lookup{$local_part}lsearch{/usr/local/exim/tables/$value-aliases}
{$value}fail}@??? failed while rewriting: failed to open
/usr/local/exim/tables/-aliases for l
inear search: No such file or directory
1998-12-18 13:19:40 Expansion of
${lookup{$local_part}lsearch{/usr/local/exim/tables/$value-aliases}
{$value}fail}@??? failed while rewriting: failed to open
/usr/local/exim/tables/-aliases for l
inear search: No such file or directory
1998-12-18 13:19:40 Expansion of
${lookup{$local_part}lsearch{/usr/local/exim/tables/$value-aliases}
{$value}fail}@??? failed while rewriting: failed to open
/usr/local/exim/tables/-aliases for l
inear search: No such file or directory
1998-12-18 13:19:40 Expansion of
${lookup{$local_part}lsearch{/usr/local/exim/tables/$value-aliases}
{$value}fail}@??? failed while rewriting: failed to open
/usr/local/exim/tables/-aliases for l
inear search: No such file or directory
  sender: cgaa392@???
    from: cgaa392@???
      to: cgaa392@???
      cc: cgaa392@???
     bcc: cgaa392@???
reply-to: cgaa392@???
env-from: cgaa392@???
  env-to: cgaa392@???



Does anyone know how to do this please?

|--------------------------------------------------------------------------|
| Steve Sargent, Vox +44 171 775 3220, Fax +44 171 775 3221                |
| QMW Computing Services,  Mile End Road,  London E1 4NS, UK               |
| Email   : S.L.Sargent@???                                          |
| WWW page: http://www.qmw.ac.uk/~cgaa160/index.html                       |
|                                                      |                   |
|                                         PIPER       _|_                  |
|                                         PA28R  ____/___\____             |
|                                         ___________[=o=]___________      |
|                                         ARROW    e/  o  \e               |

|--------------------------------------------------------------------------|



--
*** Exim information can be found at http://www.exim.org/ ***