Re: [exim] Router for specific outgoing messages?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: James Price
Ημερομηνία:  
Προς: Exim Users
Αντικείμενο: Re: [exim] Router for specific outgoing messages?

On Sep 1, 2010, at 2:30 PM, Jaap Winius wrote:

> Hi folks,
>
> Is it possible to construct a router to intercept outgoing messages
> that are destined for a specific address? If so, how?
>
> So far I've managed to write routers, for use with transports and Perl
> scripts, to modify incoming messages on the fly. This can be handy,
> e.g. for altering text formats with simple search and replace
> routines. Mine look like this:
>
>    example:
>      debug_print = "R: sda-filter for $local_part@$domain.tld"
>      driver = accept
>      local_parts = info
>      senders = info@???
>      transport = example
>      condition = "${if eq{$received_protocol}{local-bsmtp}{no}{yes}}"

>
> (Since my Perl scripts send the processed info back to Exim via BSMTP,
> the last line is to prevent an endless loop.)
>
> The "senders" line (precondition) is important here, but in the case
> of a router for outgoing messages I imagine that something like
> "recipients" would be required, except that this doesn't seem to exist.
>
> Any hints as to whether/how this might be possible would be appreciated.
>
> Cheers,
>
> Jaap


It is possible I know at the domain level, and I'm sure its possible with specific recipients, but what is your ultimate goal? Are you going to bounce an NDR to the sender? Are you going to blackhole the message (as far as the sender is concerned it was sent its just deleted w/o a NDR in exim)? You can get very creative with routing filtering based on sender, sending host, specific headers, recipients and recipient domains. How to do any of this depends on your ultimate goal. If you can give me a clear answer there, I might be able to give you a more specific router example. I've had to do a lot of this in test labs using exim as a filtering mail relay so that only specific domains are allowed out, as well as other odd scenarios.


Thanks,
James