Re: [Exim] headers_rewrite in the transport section

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Klein, Stefan
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] headers_rewrite in the transport section
On Mon, 16 Dec 2002 21:02:27 +0000 (GMT)
Philip Hazel <ph10@???> wrote:

> On Mon, 16 Dec 2002, Klein, Stefan wrote:
>
> > If i use:
> >
> > |*@materna.de    "${lookup mysql{select eMail from tbl_Mitarbeiter \
> > |                               where ID_Mitarbeiter like \
> > |                               '${quote_mysql:$local_part}'}\
> > |                               {$value}fail}" TtFf

> >
> > In the "rewrite section" it works as exspected, but if i use it in the
> > "remote_smtp" subsection of the transport section i get following error:
> >
> > |$/usr/sbin/exim -brw skl@???
> > |2002-12-16 13:52:54 Exim configuration error
> > |domain missing in rewrite key string "$local_part}'}{$value}fail}" in
> > line 285
> >
> > Can you give me a hint what the problem is?
>
> headers_rewrite in a transport is a list. The list separator is a colon.
> Enough of a hint?


No. I now have (in the config its realy one line i broke it only for the
mail):

======================================
headers_rewrite = *@materna.de  "${lookup mysql{select eMail from \
                tbl_Mitarbeiter where ID_Mitarbeiter \
                like '${quote_mysql:$local_part}'}\
                {$value}fail}" FfTt :
======================================


I still get the same error message.

From the Dokumentation:
======================================
headers_rewrite = a@b c@d f : \
                  x@y w@z
======================================


After the second rule there is also not colon, so i thought if i only have
one rule i also dont need a colon at the end.


Since exim is complaining about a missing domain i tried following:

======================================
headers_rewrite = *@materna.de  "${lookup mysql{select eMail from \
                tbl_Mitarbeiter where ID_Mitarbeiter \
                like '${quote_mysql:$local_part}'}\
                {$value}fail}@???" FfTt :
======================================


The mails should now be send to "stefan.klein@???@materna.de"
(Perhaps i can alter the database to only include the localpart if i get
exim working)

With "@materna.de" addet to the headers_rewrite rule "exim -brw" works
without an errormessage:

======================================
$exim -brw skl@???
No rewrite rules are defined
======================================

I think thats ok since the rewrite only gets activated on sending time. But
if i send a test-mail to myself i see errors in the logfile:

======================================
2002-12-17 10:41:27 18OEE1-00009Y-00 Expansion of ${lookup mysql{select
eMail from tbl_Mitarbeiter where ID_Mitarbeiter like '${quote_mysql failed
while rewriting: "${quote_mysql" is not a known operator (or a } is missing
in a variable reference)
======================================

I don't understand why the same rule works in the rewrite section, but not
as headers_rewrite rule in the transport section.

--
regards,
Stefan Klein