Here attached the quick and dirty script that I've implemented... obviously it lacks on security, file & disk usage, performance, syntax and comments (and anything else ... :D ) but it is a skel to start with for anyone interested:
I've to rectify myself... CMD space in GenericAgent is more then enough for me because this mail goes to a generic queue and I just have to classify them. so, with the same criteria used in GA I can execute a script where it takes ticket_id (ARG[1]) and goes in article table with a batch select, it parse what I need and then, with the same ticket_id I make an update...So simple ... I'm so lazy...I'm going to try this.ciao,MV
On Mon, Nov 23, 2009 at 12:43 AM, Marco Vannini <marco.vannini@gmail.com> wrote:Yes it might be, I thought that a trigger could be faster end easiest and would not impact the normal and clean flow that PostMasterMailbox implements. I was thinking at a script that could be executed by the GenericAgent too but I cannot see how having just ARG[0] and ARG[1] that I think they are not enougth for my job. So, probably I'll go through a fetchmail/procmail solution that I think it's similar to what you told me.Thank you very mutch.
cheers.MV
On Sun, Nov 22, 2009 at 11:54 PM, James Morgan <james.morgan@vernet.net.au> wrote:
I did something similar to this with RT and OTRS. There’s a department here that uses RT and we use OTRS, so I wrote a script that can accept the piped output from sendmail (as an alias), parse the message subject (which had the RT number in it) and add the RT number to one of the FreeText fields. It also did a MySQL lookup on the ticket table to work out which ticket number in OTRS was correct for that RT number and then modified the subject line of the message to suit (added [Ticket#...] because RT strips it out).
I suggest it might be a decent option for you.
From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] On Behalf Of Marco Vannini
Sent: Monday, 23 November 2009 9:36 AMSubject: Re: [otrs] freefield autofill
To: User questions and discussions about OTRS.
yes, it should be something like this.
ie, this is the incoming mail
from: ConfigurationManager
to: deployment, otrs
Subject: REV-EBIS version REV-EBIS_209.0.6.B1_IT Available for Test Environment
Body:
Availability in System Test environment.
Release REV-EBIS version REV-EBIS_209.0.6.B1_IT available for System Test environment on the Italian StarTeam server
Project: Business_Intelligence
View: REV-EBIS_209.0.6.B1_IT
CR implemented: n.a.
Bug Solved: 75948;76004
for the last two row I would like to get (for CR) n.a (or the values that could be present) and (for Bug Solved) 75948;76004 and populate freetext7 and freetext8 respectively.
On Sun, Nov 22, 2009 at 11:25 PM, James Morgan <james.morgan@vernet.net.au> wrote:
Sorry, I don’t understand the request. Are you wanting to parse the incoming message and then set FreeText fields accordingly?
From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] On Behalf Of Marco Vannini
Sent: Saturday, 21 November 2009 2:43 AM
To: User questions and discussions about OTRS.
Subject: [otrs] freefield autofill
Hi all,
Is there anyone that has an freefield autofiller just ready and modifiable ? I mean something like a mysql trigger or something else that parse incoming mail (so insert into) and take values and update the same record ?
thanks in advance.
MV
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/