Re: [exim] $header_* not defined in router?

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Jakob Hirsch
Datum:  
To: Carlo Wood
CC: exim-users
Betreff: Re: [exim] $header_* not defined in router?
Carlo Wood wrote:

>> When called as verification from a RCPT ACL this is correct, yes.
> I don't see debug output for non-verification, shouldn't the last
> time it passes through the router show that the header is present?


I wonder _why_ you even want to do your routing depending on the To:
header. Routing is usually done depending on the envelope, and for good
reasons. What you are trying to do will go wrong when a message is sent
to to somebody@??? and somebody_else@???, because it will
never be routed to example.com's MX then. Besides that, your regex is
wrong (it will catch mail for *@alinoeXcom.some_tld).

>>> Thus, you CANNOT use $header_*: in router definitions.
>> Yes you can. When they're called appropriately, at the right time -
>> which in order to check stuff sent as part of DATA is, self-evidently,
>> either in the DATA ACL or any time after that.
> I am very confused now :(.
>
> I want to route a message based on the existance of a header,
> how can I make routing decisions inside the DATA ACL?


You cannot. But you can use the ACL variables to set some flag value and
use that in your routers.
But you can test if a recipient is routable with the "verify =
recipient" statement. This will run the rcpt address through the
routers. But you can only do this in the rcpt ACL, because that's the
only point in the transaction where you get the recipients one by one
and can reject them individually.

>>> Now I need to figure out a way to do it anyway.
>> Put your conditions into the DATA ACL instead, perhaps? We haven't seen
>> all of your config (ACLs and routers together) so it's a little tricky
>> to clutch at what your system will do.
> I thought I could use a condition inside a router: if the condition is
> true - I'd route the message the way I want, and if not, it would go to
> the next router.


What should/whould the next (matching) router do with the message. Tell
us about what you are trying to do, maybe there's a working approach for it.