Hi all. I'm writing a simple spamassassin plugin that eval just
subject but it does not.

I place "new" function:

Code:

sub new {
        my ($class, $mailsa) = @_;

    # the usual perlobj boilerplate to create a subclass object
    $class = ref($class) || $class;
    my $self = $class->SUPER::new($mailsa);
    bless ($self, $class);


    # add header's token control
    $self->register_eval_rule ("check_header_token");

    # and return the new plugin object
    return $self;
}

Than i defined the function:
Code:

sub check_header_token
{
        
        my ($self, $pms) = @_;
        
        $subject = $pms->get('Subject');
        
        if($subject == 'HELLO')
        {
#bad message
                return 0;
        }
        
        return 1;
}

What i miss? I put log message on new and on rule and i saw that it
did the new function but if i telnet a mail message with "HELLO" as a
subject it write it into mailbox.

Can you help me?

Thanks in advance

--
-Massimiliano Giovine

Reply via email to