[rt-devel] SpamAssassin email filter
Stephen Quinney
stephen.quinney at computing-services.oxford.ac.uk
Tue Jun 17 09:13:35 EDT 2003
HI All,
I've just been looking at using the SpamAssassin filter in RT3.0.2,
"RT::Interface::Email::Filter::SpamAssassin". The documentation for
rt-mailgate and the code in the SpamAssassin module have got me
slightly confused so I was hoping someone could clarify things for me.
The rt-mailgate man page says about RT mail plugins:
'The module is expected to provide a "GetCurrentUser" subroutine,
which takes a hash of several parameters:'
but the SpamAssassin module just has this code:
sub GetCurrentUser {
my $item = shift;
my $status = $spamtest->check ($item);
return (0, undef) unless $status->is_spam();
eval { $status->rewrite_mail() };
if ($status->get_hits > $status->get_required_hits()*1.5) {
# Spammy indeed
return (-1, undef);
}
return (0, undef);
}
so at no point is it using these parameters that are passed in as a
hash, according to the manpage. What's going on here?
I notice that the module, RT::Interface::Email::Auth::MailFrom does
implement the correct interface:
sub GetCurrentUser {
my %args = ( Message => undef,
CurrentUser => undef,
AuthLevel => undef,
Ticket => undef,
Queue => undef,
Action => undef,
@_ );
[rest of code snipped]
}
Is this in actual fact a bug?
Thanks in advance,
Stephen Quinney
More information about the Rt-devel
mailing list