[exim] message content not seen in pipe in filters, working…

トップ ページ
このメッセージを削除
このメッセージに返信
著者: xavier
日付:  
To: Exim-users
CC: 
題目: [exim] message content not seen in pipe in filters, working in perl, not in shell

Hi,

I'm trying the pipe command in the filter,
and i can't see the message body with the shell script.


here is the filter :

# Exim filter
if error_message then finish endif
logfile $home/system/procmail/log
logwrite "$tod_log $message_id processed"
if $header_subject: contains "empire" or
   $header_subject: contains "foundation"
then
     save $home/system/mail/IN.rx/
pipe "/tmp/pipetest.sh ${domain} $message_id"
pipe "/tmp/pipetest.pl ${domain} $message_id"


endif




pipetest.sh :

#!/bin/sh
echo $@ > /tmp/testmsg
cat >> /tmp/testmsg
exit 0


pipetest.pl:

#!/usr/bin/perl

open (D,">/tmp/msgtest2");

while (<STDIN>)

{
    print D $_;


}

close D;




what i see in /tmp/testmsg : (i should see the message too...)

localhost 1C0ABc-0006MY-96

in msgtest2 everything is here.


echo test |pipetest.sh is working fine...

thanks

--
xavier