> Hi,
>
> We're using 1b from http://wiki.bestpractical.com/view/SpamFiltering
> and have also installed the disable global scrips extension to switch
> of emails for this Spam queue.
>
> The problem is as a ticket hits my support or sales queue etc. first,
> an email is still being sent out. How can we disable this for detected
> Spam so the notify emails get stopped?
>
So for example, once an email is filtered for the spam headers our MTA
has added, RT moves this ticket into our Spam queue. If this ticket
was meant for our sales queue, the sales queue still sends out an
email even though the end queue is our Spam one.
Here's the condition:
Custom action preparation code:
my $inMessage = $self->TransactionObj->Attachments->First;
return 0 if ( !$inMessage ); # if no message attachment - assume web UI
return 0 if ( !$inMessage->GetHeader('Received') ); # exit if not email message
if ( $inMessage->GetHeader('X-nohelo')
|| $inMessage->GetHeader('X-badhelo')
|| $inMessage->GetHeader('X-ptrmismatch')
|| $inMessage->GetHeader('X-sendercalloutfail')
|| $inMessage->GetHeader('X-rbl-spamhaus')
|| $inMessage->GetHeader('X-rbl-spamcop') )
{
return 1;
}
else { return 0; }
Custom action cleanup code:
my $newqueue = 'Spam';
my ( $status, $msg ) = $self->TicketObj->SetQueue($newqueue);
return $status ? undef : 1;
How can I switch off the email trigger for this match?
Thanks.
RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year -- Learn how to get the most out of RT!