[rt-users] Filter on body

Gene LeDuc gleduc at mail.sdsu.edu
Tue Sep 11 12:53:26 EDT 2007


Hi Machiel,

I do something similar.  Since this transaction is On Create, look at the 
transaction content instead of the ticket body.
   if ($self->TransactionObj->Content( ) =~ /Content I filter on /i )

Regards,
Gene

At 01:46 AM 9/11/2007, Machiel van Veen wrote:
>Hi list,
>
>I need to create a filter to move messages to a queue automaticly 
>depending on
>the contents of the email body. I already have filters checking on subject so
>I think I can reuse that one.
>
>Would the following filter work?
>
>---
>
>Condition: On Create
>
>Action: User Defined
>
>Template: Global template: Blank
>
>Stage: TransactionCreate
>
>Custom condition:
>
>Custom action preparation code: return 1;
>
>Custom action cleanup code:
>if ($self->TicketObj->Body( ) =~ /Content I filter on /i ) {
>
>$self->TicketObj->SetQueue('Destination queue');
>                                                 return 1;
>                                                 }
>
>---
>
>Thanks for any help on this in advance.
>
>--
>Best regards,
>
>Machiel van Veen
>_______________________________________________
>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
>Community help: http://wiki.bestpractical.com
>Commercial support: sales at bestpractical.com
>
>
>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>Buy a copy at http://rtbook.bestpractical.com


-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 




More information about the rt-users mailing list