[rt-users] How to remove notify adminCC's when receiving spam?
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 Requestorshttps://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=3” or the “On Create Notify AdminCcshttps://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. 15https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=15 On Create * Actionhttps://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=15 On Create User DefinedBlank Enabled 3https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=3 On Create Autoreply To Requestorshttps://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=3 On Create Autoreply To Requestors Autoreply with password Enabled 4https://itsupport.student.dtu.dk/Admin/Scrips/Modify.html?id=4 On Create Notify AdminCcshttps://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
[rt-users] change queue not triggering Scrip
Hi, I've created a Scrip with condition On Queue Change but it only works when I change the queue via the GUI. I've created a little custom perl module in Actions to change the queue which works great (I'm calling it from rt-crontool), but it doesn't trigger the Scrip. Anyone any ideas what's going on? thanks, Andy. PS the code for my PM is below: use strict; use warnings; use RT::Queue; use base qw(RT::Action); package RT::Action::Test; my $self; sub Prepare { my $self = shift; return 1; } sub Commit { my $self = shift; my $argument = $self-Argument; unless ( $argument ) { $RT::Logger-error(Argument is mandatory for Test action); return 0; } my ($status, $msg) = $self-TicketObj-SetQueue($argument); if ( not $status ) { RT::Logger-error(Could not reassign queue: $msg); } return 1; } 1;
Re: [rt-users] change queue not triggering Scrip
On Mar 20, 2015, at 5:20 AM, a.sm...@ldex.co.uk wrote: Hi, I've created a Scrip with condition On Queue Change but it only works when I change the queue via the GUI. I've created a little custom perl module in Actions to change the queue which works great (I'm calling it from rt-crontool), but it doesn't trigger the Scrip. Anyone any ideas what's going on? I've noticed that some of the things done with rt-crontool don't get recorded and therefor don't trigger scrips. This might be because of something minor missing in your custom perl module (custom action). When the custom perl module changes the queue do you see a transaction listed in the ticket history reflecting the queue change or is the queue just different on the ticket with no mention of it in the ticket history? If there's no mention of it in the ticket history it means that the transaction is not recorded. This is similar, although not quite the same as, AddCustomFieldValue( Field ..., Value ..., RecordTransaction = 0 ). I'd probably try and find a way to get the queue change to be recorded in the ticket history that way it would trigger scrips such as the On Queue Change one you have that works when using the GUI. Landon Stewart : lstew...@iweb.com Lead Specialist, Abuse and Security Management Spécialiste principal, gestion des abus et sécurité http://iweb.com : +1 (888) 909-4932 signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [rt-users] change queue not triggering Scrip
I've noticed that some of the things done with rt-crontool don't get recorded and therefor don't trigger scrips. This might be because of something minor missing in your custom perl module (custom action). When the custom perl module changes the queue do you see a transaction listed in the ticket history reflecting the queue change or is the queue just different on the ticket with no mention of it in the ticket history? Yep, I can see in the ticket root - Queue changed from where I am running the rt-crontool as the root user. So far as I can think that should be good enough right? thanks for the input though, Andy.