Re: [exim] Injecting emails directly into a router/transport

Top Page
Delete this message
Reply to this message
Author: Ted Cooper
Date:  
To: exim-users
Subject: Re: [exim] Injecting emails directly into a router/transport
On 11/11/14 11:49, Phil Pennock wrote:
> Put that router first, add a condition on the router based on
> `$received_protocol`, add `no_more` so that any mails of that protocol
> won't be passed to later routers.
>
> Specify a protocol manually, which leads to:
>
>> > The only hint I have so far is that I could structure the injected
>> > emails like BSMTP and call "exim -bS -oMr userfwd", but then I would
>> > need a program to convert a raw email into bsmtp.
> You don't need to specify -bs/-bh/-bS
>
> Running: exim -oMr foo $recipient
> should work; so should: exim -oMr foo -f $sender $recipient
>
> So while BSMTP offers the most specificity around precisely controlling
> recipients, you can do the above too. Just do *not* use `-t` which
> would parse the message for recipients and result in re-broadcasting to
> CC'd addresses.
>
> You might also consider looking at $received_protocol during ACL
> processing, for control options to avoid any fixups which you might
> otherwise be activating for local messages.


Cheers Phil,

This did exactly what it needed to do with little change to the existing
setup - the message is treated almost exactly the same, and could almost
work without the -oMr.

[destination]
type = MDA_external
path = /usr/bin/exim
arguments = ("-oMr", "getmail", "-f", "%(sender)", "me@???")

The -bS parameter sent me a long way wrong, and I lost sight of how
simple this really should have been.