Changeset 1517

Show
Ignore:
Timestamp:
08/20/06 20:10:41
Author:
charsbar
Message:

Filter::SpamAssassin?: added tests and sample rules (and a few fixes for the plugin itself)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Filter/SpamAssassin.pm

    r1432 r1517  
    3232 
    3333    # create a pseudo mail header to skip some of the sa's default tests 
    34     my $status = $sa->check_message_text( 
    35         MIME::Lite->new( 
    36             From    => 'plagger@localhost', 
    37             To      => 'plagger@localhost', 
    38             Subject => encode('MIME-Header', $entry->title_text), 
    39             Data    => $entry->body_text, 
    40         )->as_string 
    41     ); 
     34 
     35    my $mail  = MIME::Lite->new( 
     36        From       => 'plagger@localhost', 
     37        To         => 'plagger@localhost', 
     38        Subject    => encode('MIME-Header', $entry->title_text), 
     39        'X-Mailer' => 'plagger', 
     40        Data       => $entry->body_text, 
     41    )->as_string; 
     42 
     43    my $status = $sa->check_message_text( $mail ); 
    4244 
    4345    if ($status->is_spam) { 
     
    6567      new: 
    6668        local_tests_only: 1 
    67         config_text: 
    68           - score NO_RELAYS       0.0 
    69           - score NO_RECEIVED     0.0 
     69        site_rules_filename: some_rule.cf 
    7070 
    7171=head1 CONFIG