[rt-users] Recognize tickets created via email or via web
craig at 2ndquadrant.com
Fri Mar 22 05:27:58 EDT 2013
On 03/22/2013 05:19 PM, Emmanuel Lacour wrote:
> On 21/03/2013 12:38, Michele Bergonzoni wrote:
>> I have a custom scrip where I want to distinguish whether the ticket was
>> created via email or via web.
>> Now I am looking at ther "Received:" header of the first attachment of
>> the first transaction of the ticket:
>> This apparently works and has insofar not misclassified, but seems quite
>> ugly to me. For example, future versions of RT could add a "Received:"
>> with the IP address where the web connection came from (many webmails do
>> that). I didn't even try with a ticket created via CLI.
>> Can anyone suggest a better and future-proof approach?
> well that's what I used to used since a long time and it still works ;)
> if you look at the transactions and attachments table, there is
> currently no dedicated field/header set by RT to distinguish those
> transactions. SO as of now, looking at the "Received" header looks the
> best solution.
Another option would be to modify RT::Interface::Email.pm and
RT::Interface::Web.pm to insert the desired header into the generated
message (in the case of Web.pm) or parsed email (in the case of
Email.pm). You could probably make a convincing case for such a patch to
be accepted into RT proper, at least for adding a header to Web.pm
generated messages; probably harder to argue modification of externally
originated mail for Email.pm.
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
More information about the rt-users