[rt-users] Scrip works on tickets created via RT web interface but not via e-mail

Steve Hopps steve.hopps at gmail.com
Mon Dec 1 11:51:29 EST 2008

Hi everyone, I'm trying to create a scrip that parses incoming e-mails and
rejects tickets with a certain phrase. I've got the scrip to work on all
tickets created in the queue via the RT web interface, but emails that come
into that queue still make it through. Does anybody know what I could be
missing that would cause it to work on tickets created via the web
interface, but not tickets created via e-mail?
Here's what I've got in the scrip:
Condition: User Defined
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

Custom Condition:
my $Ticket = $self->TicketObj; my $Transaction = $self->TransactionObj; my
$Attachment = $Transaction->Attachments; my $AttFirst = $Attachment->First;
my $Content = $AttFirst->Content; my $test = 0; $test = 1 if (lc($Content)
=~ m/the caller hung up before leaving a message/i); if($test == 1) { return
1; } return;

Custom Action Prep:
$self->TicketObj->SetStatus( "rejected" ); return 1;

Custom Action Cleanup:
return 1;

I greatly appreciate any help, thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20081201/9c8a2757/attachment.htm>

More information about the rt-users mailing list