I need to extract a list of ticket Ids of tickets that include emails with specific custom SMTP header values. I can do that in bulk by querying the database column Attachments.Headers. I can also iterate through Tickets and related Transactions in Perl and scrutinize $transaction->Attachments->First->Headers();
However, I would like to empower regular users to do same using TicketSQL searches and/or by issuing calls against the REST2 interface.
Any suggestions?