Re: [exim] Save a mail and then execute a script

Top Page
Delete this message
Reply to this message
Author: Peter Velan
Date:  
To: exim users
Subject: Re: [exim] Save a mail and then execute a script
am 13.05.2008 14:23 schrieb Julien Balmont:
> Peter, you're my hero :)


:-[

I'm curious: Which part of my message was helpfull?

Peter

PS: Type a response *below* the quoted material you're responding to,
so it reads like a conversation. Please don't top-post!
<http://www.faqs.org/faqs/comics/xbooks/readpost/section-4.html>

> On Tue, May 13, 2008 at 1:20 PM, Peter Velan <pv0001@???> wrote:
>
>> am 13.05.2008 12:09 schrieb Julien Balmont:
>> > BTW, I'm afraid the file is saved only after the script is called.
>> > Is there a way to avoid this behaviour?
>>
>> My transport looks like ...
>>
>> script_transport:
>> driver = pipe
>> envelope_to_add
>> delivery_date_add
>> user = userxyz
>> group = groupxyz
>> command = /scriptpath/perlscript -para1=y -para2=y -para2=n - -
>>
>> The essential part in my script: read piped message from STDIN and save
>> it in a file ...
>>
>> open( MAIL, "> $filename" );
>> while( <> ) { print MAIL $_; }
>> close( MAIL );
>>
>> Now I could do whatever I want on the stored copy of the message.
>>
>> Do you rely on Exim to store the message or do you read the pipe?
>>
>> Cheers,
>> Peter