RT::Interface::Email::Filter::CheckMessageId - Find related ticket from references mail header


This extension check if received mail correspond to an already existing ticket according In-Reply-To and References header tag.

If a ticket (and only one) is found the mail subject is altered to include the [... #n] mark, so RT will push the mail as mail comment instead creating a new ticket.

This is usefull with this scenario: Requestor send a mail to RT system and a Friend. The Friend think he can help, so reply to all without the subject properly tagged, then RT create a new ticket.

With This extension, RT will find the In-Reply-To header tag match with the ticket's attachement and then the Friend's mail will be added as comment.



If set ticket in state listed are ignore letting a new bug to be open.

Initial keywords will match all initial state (new).

Active keywords will match all inactive state (open).

Inactive keywords will match all inactive state (rejected, resolved).


This plugin search messages Id in column 'messageid' of the table 'attachments'. It is strongly recommanded to create an index to speed-up the search in this table.

Connect to the database:

    CREATE INDEX messageid_idx ON attachments (messageid);



Modify header subject to include [... #n] ticket reference.


Return current user.

Does nothing, this method is here to allow the plugin to be detected


  Olivier Thauvin <>


  Asa Gage <agage at>


Copyright (c) 2013, Olivier Thauvin

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.