Re: [Exim] How to deliver to two transports?

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Nico Erfurth
Fecha:  
A: Erik Enge
Cc: exim-users
Asunto: Re: [Exim] How to deliver to two transports?
Erik Enge wrote:
> Hi (again) all.
>
> So I'm starting to understand how Exim works now, I think. :)
>
> I've got Cyrus, Amavis-ng and Exim (4.04) up and running and all parts


you should updated to 4.10

> work as they should (at least it seems so). However, when I put them
> all together things start to get shaky.
>
> My first router is this:
>
> amavis_director:
> condition = "${if eq {$received_protocol}{scanned-ok} {0}{1}}"
> driver = accept
> transport = amavis


You should add no_verify here, otherwise a recipient-check will accept
nearly anything.

> Because I want the spam/virus checker to run first, this is good.
>
> The amavis transport is:
>
> amavis:
> driver = pipe
> command = "/usr/local/bin/amavis -f <${sender_address}> -d ${pipe_addresses}"
> message_prefix = ""
> message_suffix = ""
> check_string =
> escape_string =
> return_output = true
> return_path_add = false
> user = amavis
> group = amavis
> headers_add = "X-Virus-Scanned: by AMaViS-ng"
> path = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
> current_directory = "/var/amavis"
>
> And I believe this is good, too. Now, my only problem is that after the
> amavis transport has run, the mail doesn't really get delivered (and
> according to my setup, I guess it shouldn't - but I want it to. :).


This router+transport will send the mail into amavis, after this, the
message is delivered for exim and disappears from the queue (if nothing
goes wrong while amavis runs).
Amavis SHOULD reinject the message after this, one problem i could think
of is, that amavis calls sendmail to reinject the message, if you did
not delete the sendmail binary and set up a link to the exim binary the
message will be in sendmails queue now (or whatever you had installed
before).

> My local_delivery transport says:
>
> local_delivery:
>         driver = pipe
>         command = "/usr/libexec/cyrus/deliver ${local_part}"
>         return_path_add
>         return_output
>         message_prefix = ""
>         user = cyrus

>
> Is there any way I can have the local_deliver run after amavis?


The amavis_director (in fact its a router, because exim4 abolished the
concept of directors, everything is a router now) will catch EVERY mail,
unless its injected as scanned-ok so your local_delivery-router (you
just showed the transport, but i assume you have a router too) will
never be called in the first run.

ciao