RE: [Exim] Looking at each email sent out

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Dan Muey
Datum:  
To: Andreas J Mueller
CC: exim-users
Betreff: RE: [Exim] Looking at each email sent out
> Hi Dan!

Hey Andy thanks for your time!
I'll check the docs about those three ideas.
I knew there was a way, thanks.

Any idea off the top of your head where in the docs I should look?
If not don't worry I'll find it, I just needed a shove in the right direction.
>
> >> Basically I need the date,to, and from info minimally and
> subject if
> >> possible and perhaps but probably not the body.
>
> This is readily available (less the body) from the Exim logs,
> if you enable recipients and subject logging.
>
> > Is there a way to pipe a copy of each outgoing email for a
> domain to
> > an external program?
>
> Many. Two possibilities are:
>
> - A system filter that acts on sender's domain and does an unseen
> delivery to a pipe (if $sender_address_domain is "..." then unseen
> deliver |/home/external_program.pl endif).


Where would I do this? In the exim.pl file?

>
> - A redirect router that acts on sender's domain and does an unseen
> route to a pipe transport:
>
>     driver = redirect
>     senders = domain.com
>     data = |/home/external_program.pl
>     no_verify
>     no_expn
>     pipe_transport = address_pipe
>     unseen


I like this option best since I already parse email a lot. And I might not parse
the log file right and miss something.

Excuse the Exim newbie question, but where would I put those lines above (exim.conf ??)
    driver = redirect
    senders = domain.com
    data = |/home/external_program.pl
    no_verify
    no_expn
    pipe_transport = address_pipe
    unseen
And that would send the email into 'data''s STDIN and then continue processing as if nothing happened for any email being sent from domain.com?


If that's all true then I'm all set!

Thanks again Andy!

Dan

> The use of unseen in both cases is important. Exim will then
> just continue to process the mail as if nothing had happened.
>
> Andy
>
>