[rt-users] rt 3 and @RT::MailPlugins
Mathieu Arnold
mat at mat.cc
Sun May 18 09:41:21 EDT 2003
+-le 10/05/03 11:18 +0200, Mathieu Arnold écrivait :
|
|
| +-le 09/05/03 15:16 -0400, Jesse Vincent écrivait :
|| there's no reason you need to drop configuration variables anywhere
|| other than the config file. If you've got a patch to the pod, I'd love
|| it if you can bounce it to rt-3.0-bugs at fsck.com
|
| I've put this in my RT_SiteConfig.pm :
| @RT::MailPlugins = (
| sub {
| my %args = ( Message => undef,
| CurrentUser => undef,
| AuthLevel => undef,
| Ticket => undef,
| Queue => undef,
| Action => undef,
| @_ );
| my $s = $args{'Message'}->head->get('X-Spam-Level');
| if (defined($s) && $s =~ /\*{8}/o) {
| return (-1, undef);
| }
| return (0, undef);
| },
|
| "Auth::MailFrom");
|
| I already have spamassassin set up to tag all mails, and so, I check the
| X-Spam-Level header. The thing is that it does not seems to work, it seems
| to create an empty ticket owned by RT...
|
| Any idea ?
I did this based on the Filter::Spamassassin module, and well, I guess that
all the return parameters are in the wrong way.
In Auth::MailFrom, I see :
unless ( $unpriv->Id ) {
$RT::Logger->crit( "Auth::MailFrom couldn't find the 'Unprivileged'
internal group" );
return ( $args{'CurrentUser'}, -1 );
}
and in Filter::SpamAssassin, I see :
# Spammy indeed
return (-1, undef);
which is obviously wrong seing that the one before works.
I guess someone could fix it so that no one else tries to do things the wrong
way :)
--
Mathieu Arnold
More information about the rt-users
mailing list