Re: [Exim] Forcing no_more

Góra strony
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Dla: William Craven
CC: exim-users
Temat: Re: [Exim] Forcing no_more
On Mon, 2 Dec 2002, William Craven wrote:

> I have a set of routers that deal with virtual domains and I would like
> the last router in the set that handles virtual domains to bounce a
> customised error message within the standard Exim error message
> template.
>
> If I understand the Exim 4.10 manual correctly, if the bounce is
> generated by a pipe the contents of the pipe output are included.


Correct. However, Another way of doing this is to use a redirect router
with a data option that ends up as :fail:. For example:

bounce_router:
driver = redirect
domains = whatever...
allow_fail
data = :fail: your message here

That is much simpler than having to run a pipe transport.

> virtual_error:
>     driver = accept
>     domains = +virtual_domains
>     require_files = /usr/local/etc/exim/virtual/${domain}/error
>     transport = error
>     no_more


> If /usr/local/etc/exim/virtual/${domain}/error exists then it works fine
> - however if the file does not exist; Exim proceeds onto the next router
> and ignores the no_more clause.


That is as documented because require_files is a pre-condition. If it is
false, the router does not run; no_more applies to what happens when a
router runs and declines.

> So what I am asking is how do I configure the above router to stop
> regardless of the preconditions. Any thoughts from the list....


You have to stick another router after it; a redirect router with :fail:
will do that job. I think that's where I came in ... :-)

Or, you move the existence test into your script.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.