[Exim] headers_rewrite in transport does not work?

Página Inicial
Delete this message
Reply to this message
Autor: Schweikert, Martin {POYD~Kaiseraugst}
Data:  
Para: 'exim-users@exim.org'
Assunto: [Exim] headers_rewrite in transport does not work?
Hi!

I'm trying to do a header rewrite on a dial-in system so that

    root@???


will be rewritten as

    martin@???


I'm using the router

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport= ${if match{$domain}{\N\.localdomain$\N}{int_smtp}{ext_smtp}}
ignore_target_hosts = 127.0.0.0/8
no_more


("localdomain", because I set "primary_hostname = jakob.localdomain").

The transport ext_smtp looks like this:

ext_smtp:
     driver = smtp
     headers_rewrite = *@*.localdomain \
          ${lookup{$1}cdb{/usr/exim/cdb/mail.handles.cdb}{$value}fail}
     return_path = \
       ${if match{$return_path}{\N^([^@]+)@(.*)\.localdomain$\N}\
        {\
        ${lookup{$1}cdb{/usr/exim/cdb/mail.handles.cdb}{$value}fail}\
        }\
        fail}


But my mails have my login name before the '@' and not what should be replaced using /usr/exim/cdb/mail.handles.cdb
(doing a "cdbget root < /usr/exim/cdb/mail.handles.cdb" manually retrieves the correct value).

I have the impression that the headers_rewrite statement isn't executed at all - I can delete mail.handles.cdb without getting an error message.

It _does_ work, though ("root@???" is actually rewritten as "martin@???"), if I put the statement

*@*.localdomain
${lookup{$1}cdb{/usr/exim/cdb/mail.handles.cdb}{$value}fail}@martin-
schweikert.de Ffrs

(in 1 line) into the "REWRITE CONFIGURATION" section.

Why does this work, and not the way using the transport ext_smtp?

(Should it matter: it is exim 4.01 under RedHat 7.2)

Regards,
Martin
--
http://www.martin-schweikert.de