On 10/30/06, itdelany <[EMAIL PROTECTED]> wrote:
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?
I haven't tested this script by running it manually and this script is not written by me. But you can run it manually as it is a script it can be run from the command line. I don't know about the parameters may be you can pass a fake or unwanted email to this script.
2)The script takes the message and leaves everything down "Content-Type: Message" right?
May be yes. The script extracts the original mail from the forwarded mail and then through sa-learn we make spamassassin learn it as spam.
3) Can i follow this rules on a production server? is it safe ?
People are using it on production server including me.
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.