Hey, thanks for your help, because i see that it will take me some time to do
all that i'll ask you some preliminary questions:

1) Can i run the script by hand just for testing purposes?  Do you know how
can i do this? Do i have to pass some parameters to the command line?

2)The script takes the message and leaves everything down "Content-Type:
Message" right?

3) Can i follow this rules on a production server? is it safe ?

Many Thanks for your help!

your Script:


_________________________

#!/usr/bin/perl

use strict;
use warnings;

my @message = <STDIN>;
my $path = "/tmp/spam/";

use Mail::SpamAssassin::Message;
use Data::UUID;

my $msg = Mail::SpamAssassin::Message->new(
    {
      'message' => [EMAIL PROTECTED],
    }
) || die "Message error?";

foreach my $p ($msg->find_parts(qr/^message\b/i, 0)) {
    eval {
           no warnings ;
           my $type = $p->{'type'};
           my $ug = new Data::UUID;
           my $uuid1 = $ug->create_str();
           my $attachname = $path . $uuid1 . ".eml";
           open OUT, ">", "$attachname" || die "Can't write file
$attachname:$!";
           binmode OUT;
           print OUT $p->decode();
    };
}



-- 
View this message in context: 
http://www.nabble.com/Thunderbird-Forwarding-Spam-tf2539303.html#a7076401
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.

Reply via email to