Search mail logs by search term and output logs grouped by message id.