Re: [Evolution] Pipe message to Shell....



I just started using bogofilter to filter spam a few weeks ago when I was
using the Evolution 1.2 releases.

I used the steps outlined at:
http://www.ime.usp.br/~rsilva/bogo-and-evo/

Since then I have upgraded to the 1.4 version of Evolution and the 'pipe
message to shell command' seems to stop working. I wrote a little perl
shell command to test it and It does seem to not be working.

Does anyone have any advice on this matter?

I don't know about those bogofilter Filter, but I just tested the 'pipe
to shell command' Action (! new in 1.4) and it works for me.

However, your script likely will *NOT* do what you intend, as I assume
you want to dump the *entire* message and not only the first line,
doubled... ;-)


Some comments:

my $input = <STDIN>;

$input will *only* be the first line. Use an array, to suck in the
entire <STDIN>.

$input .= "input was: $input??\n";

Lets assume, the first line is "From user host", of course followed by a
newline. $input now is:

From user hosts
input was: From user host
??

Sure, I can only assume, that output was not intended. I might be wrong
and the script does, what you want. I really don't want to offend you,
so please don't take me wrong.

...guenther


A very quick script, that actually will dump the entire message and the
arguments used to a file:

#!/usr/bin/perl -w

use strict;

my @mail = <STDIN>;

open OUT, '>/home/guenther/tmp/dump';
print OUT "# arguments: @ARGV\n";
print OUT @mail;
close OUT;


-- 
char *t="\10pse\0r\0dtu\0  ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]