[Exim] Problems with header re-writing

Top Page
Delete this message
Reply to this message
Author: Paul Walsh
Date:  
To: Exim Users
Subject: [Exim] Problems with header re-writing
Scenario:

Incoming mail addressed to User.Name@??? to be delivered to
ID@???
Outgoing mail from ID@??? to have headers re-written
so that mail appears to come from User.Name@???

Here's the director:

research:
driver = aliasfile
# >> Option added by convert4r3
file_transport = address_file
# >> Option added by convert4r3
pipe_transport = address_pipe
domains = research.uce.ac.uk
no_more
file = /usr/exim/db/research.aliases
search_type = dbm

where "research.aliases" contains records such as

User.Name: ID@???


I have the following header re-writing rules:

*@research.uce.ac.uk
${lookup{${lc:$1}}dbm{/usr/exim/db/research.aliases}\
                       {$value}fail}@??? bcrt


*@research.exchange.uce.ac.uk
${lookup{${lc:$1}}dbm{/usr/exim/db/rresearch.aliases}\
                       {$value}fail}@??? bcfrF


where "rresearch.aliases" has the reverse mapping:
ID: User.Name


Test of incoming rewriting (User.Name@??? to
ID@??? ) yields this:

# exim -d6 -bt User.Name@???                         
Exim version 3.12 debug level 6 uid=0 gid=1
probably ndbm
Caller is an admin user
Caller is a trusted user
user name "System Admin" extracted from gecos field "System Admin"
.
.
*snip various lines of the form "User.Name@??? in
*@some.domain.uce.ac.uk? no (end of list)"*
.
research director: dbm key=user.name
  file="/usr/exim/db/research.aliases"
.
.


*snip various lines of the form "ID@??? in
*@some.domain.uce.ac.uk? no (end of list)"*
.
.
research director generated ID@???
  errors_to=NULL transport=NULL
  uid=unset gid=unset home=NULL
research director succeeded for user.name
hcol_route router called for ID@???
  route_domain = research.exchange.uce.ac.uk
hcol_route router failed
hcol_ex_route router called for ID@???
  route_domain = research.exchange.uce.ac.uk
hcol_ex_route router failed
exchange_route router called for ID@???
  route_domain = research.exchange.uce.ac.uk
exchange_route router failed
uce_route router called for ID@???
  route_domain = research.exchange.uce.ac.uk
uce_route router: lsearch key=research.exchange.uce.ac.uk
  file="/usr/exim/tables/uce_routes"
routed by uce_route router:
  deliver to ID@???
  transport: UCE_smtp
  host exchange2.uce.ac.uk [193.60.140.216] MX=10
  host exchange3.uce.ac.uk [193.60.140.4] MX=20
ID@???
    <-- User.Name@???
  deliver to ID@???
  router = uce_route, transport = UCE_smtp
  host exchange2.uce.ac.uk [193.60.140.216] MX=10
  host exchange3.uce.ac.uk [193.60.140.4]   MX=20



Outgoing re-write yields this:

# exim -bvs ID@???
Address rewritten as: User.Name@???
User.Name@??? verified

The above tests, to me, indicate that the directing/routing and header
re-writing are working, BUT...

I get the following appear in main and panic logs:

2000-06-19 13:08:15 1340Lf-0004jL-00 Rewrite of User.Name@???
yielded unparseable address: malformed address: @research.exchange.uce.ac.uk
may not follow ID@??? in address
ID@???@research.exchange.uce.ac.uk

Any ideas folks? I can't see the wood for the trees here.

Paul Walsh

Senior Systems Programmer, Information Services,
University of Central England, BIRMINGHAM B42 2SU, UK
Tel: +44 (0)121 331 5708    Fax: +44 (0)121 356 2875