[rt-users] How to remove notify adminCC's when receiving spam?

Sidsel Jensen sidj at dtu.dk
Fri Mar 20 07:32:58 EDT 2015


Hi

I recently followed the http://requesttracker.wikia.com/wiki/SpamFiltering and set up Spamassassin and filtering according to method 1b, by adding a Global Scrip like this:

Scrip: On Create * Action:

Action code:
# Match spamassasins spam-flag

 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

 my $spamFlag = $inMessage->GetHeader('X-Spam-Flag');
 return ( $spamFlag !~ 'YES' ) ? 0 : 1;

Commit code:
my $newqueue = 'spam';
my ($status, $msg) = $self->TicketObj->SetQueue($newqueue);
return $status ? undef : 1;

and that works flawlessly – BUT I still get an e-mail notification to the requestor and the admincc’s of the original queue the spam was sent to.

Is there a way to make sure that if the “On Create * Action” scrip was run, then it should not run the “On Create Autoreply To Requestors<https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=3>” or the “On Create Notify AdminCcs<https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=4>” ?

I tried changing the order of my “On Create” Scrips so now they have the following order ( see below ) but it doesn’t seem to help.
15<https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=15>     On Create * Action<https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=15>     On Create       User Defined    Blank   Enabled
3<https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=3>       On Create Autoreply To Requestors<https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=3>       On Create       Autoreply To Requestors Autoreply with password Enabled
4<https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=4>       On Create Notify AdminCcs<https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=4>       On Create       Notify AdminCcs Transaction     Enabled
Any pointers in the right direction would be appreciated

Kind Regards,
Sidsel Jensen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150320/313fb43e/attachment.htm>


More information about the rt-users mailing list