Filtering of incoming emails

I woud like to filter incoming emails on a certain string.
I mean if this string is in the subject message I send the email in
another queue or I reject the email.
Any idea, I 'm quite sure that it has already be done?

If you want to reject the mail then you’ll need to do that on the MTA
level, to redirect the ticket to another queue you can write a scrip
with the following action:
if (($self->TicketObj->Subject() =~ /The string you are looking for/i){
$self->TicketObj->SetQueue('the another queue ');
return 1; wrote: