[rt-users] Filtering email using MailFrom plugin

Todd Wade todd at bestpractical.com
Sat Jul 11 13:34:26 EDT 2015

On 7/11/15 11:50 AM, Ashish Patil wrote:
> I get a lot of notifications from root at localhost to the email account
> that has been configured. I wish to move these emails to a different
> queue. The way I tried to do it is by modifying the MailFrom plugin to
> pattern match the sender and change the queue. I am unable to change the
> queue. I wish to know how this can be done, or is there a simpler way in
> which I can achieve it?


Has been configured where? $OwnerEmail?

Assuming RT is doing everything you want except for putting the message 
in the wrong queue, you could do something like this in a scrip with an 
on create condition and custom action and no template:

my $Ticket = $self->TicketObj;

if (my $Requestor = eval { $Ticket->Requestor->UserMembersObj->Next }) {
   if ( $Requestor->EmailAddress eq 'root at localhost' ) {
     my $Queues = RT::Queue->new( RT->SystemUser );
     $Queue->Load( 'System Messages' );
     $Ticket->SetQueue( $Queue->Name );


More information about the rt-users mailing list