Discussion:
[otrs] X-OTRS-Headers - Usage
Duane Owens
2008-02-06 03:46:33 UTC
Permalink
Hello,



I am needing to create tickets via email from another system. In reading
the documents, it is unclear on the format and methodology for having OTRS
receive emails (via POP3) and assign values based upon values I am embedding
into the email body. Here's a snippet of what a typical email body looks
like:



Time: Tuesday, February 5, 2008 8:19:56 PM MST Severity: Major

X-OTRS-CustomerNo: SKY

X-OTRS-Service: VPN Tunnel

X-OTRS-SLA: 1 - Critical Priority

X-OTRS-Queue: SoD - Support



OTRS should receive the email and create a ticket with the CustomerNo,
Service, SLA and Queue values but it doesn't; it just creates the ticket
with the sysconfig default values.



Any ideas on what I'm missing?



PS: Very nice product, I am anxious to impress my coworkers.



Duane
Nils Breunese (Lemonbit)
2008-02-06 08:08:30 UTC
Permalink
Post by Duane Owens
I am needing to create tickets via email from another system. In
reading the documents, it is unclear on the format and methodology
for having OTRS receive emails (via POP3) and assign values based
upon values I am embedding into the email body. Here’s a snippet of
Time: Tuesday, February 5, 2008 8:19:56 PM MST Severity: Major
X-OTRS-CustomerNo: SKY
X-OTRS-Service: VPN Tunnel
X-OTRS-SLA: 1 - Critical Priority
X-OTRS-Queue: SoD – Support
OTRS should receive the email and create a ticket with the
CustomerNo, Service, SLA and Queue values but it doesn’t; it just
creates the ticket with the sysconfig default values.
Any ideas on what I’m missing?
You shouldn't put those in the body, but in the header. Then you can
use the PostMaster Filter feature to further act upon the presence of
these headers. See section 5.14 'Filtering incoming messages' in the
docs: http://doc.otrs.org/2.2/en/html/x1053.html

Nils Breunese.
Duane Owens
2008-02-06 15:30:12 UTC
Permalink
Thanks Nils,

I have been reading the docs I just missed that the X-OTRS needed to be in
the HEADERs of the message. I'm not sure if OPENNMS provides this out of
the box? Thanks again for the answering such a dumb question.

Duane
-----Original Message-----
From: otrs-***@otrs.org [mailto:otrs-***@otrs.org] On Behalf Of Nils
Breunese (Lemonbit)
Sent: Wednesday, February 06, 2008 1:09 AM
To: User questions and discussions about OTRS.org
Subject: Re: [otrs] X-OTRS-Headers - Usage
Post by Duane Owens
I am needing to create tickets via email from another system. In
reading the documents, it is unclear on the format and methodology
for having OTRS receive emails (via POP3) and assign values based
upon values I am embedding into the email body. Here's a snippet of
Time: Tuesday, February 5, 2008 8:19:56 PM MST Severity: Major
X-OTRS-CustomerNo: SKY
X-OTRS-Service: VPN Tunnel
X-OTRS-SLA: 1 - Critical Priority
X-OTRS-Queue: SoD - Support
OTRS should receive the email and create a ticket with the
CustomerNo, Service, SLA and Queue values but it doesn't; it just
creates the ticket with the sysconfig default values.
Any ideas on what I'm missing?
You shouldn't put those in the body, but in the header. Then you can
use the PostMaster Filter feature to further act upon the presence of
these headers. See section 5.14 'Filtering incoming messages' in the
docs: http://doc.otrs.org/2.2/en/html/x1053.html

Nils Breunese._______________________________________________
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
Support or consulting for your OTRS system?
=http://www.otrs.com/
Nils Breunese (Lemonbit)
2008-02-06 16:25:46 UTC
Permalink
Post by Duane Owens
I have been reading the docs I just missed that the X-OTRS needed to be in
the HEADERs of the message. I'm not sure if OPENNMS provides this out of
the box? Thanks again for the answering such a dumb question.
I have no experience with OpenNMS. You'd have to ask the OpenNMS guys.

Nils Breunese.
Duane Owens
2008-02-06 17:31:15 UTC
Permalink
I did some research and OPENNMS doesn't have a method for allowing me to
specify X-OTRS-Headers in the email headers before it sends. Is there a way
that I can preprocess the entire message in OTRS <before> the PostMaster
runs it through the parser? If I can, I can maybe 'rearrange' the message
to move my X-OTRS-Headers into the email header.

Or, if you know of a better idea (aside from me accepting that I suck at
this and should probably take up knitting or something).

Thanks,

Duane

-----Original Message-----
From: otrs-***@otrs.org [mailto:otrs-***@otrs.org] On Behalf Of Nils
Breunese (Lemonbit)
Sent: Wednesday, February 06, 2008 9:26 AM
To: User questions and discussions about OTRS.org
Subject: Re: [otrs] X-OTRS-Headers - Usage
Post by Duane Owens
I have been reading the docs I just missed that the X-OTRS needed to be in
the HEADERs of the message. I'm not sure if OPENNMS provides this out of
the box? Thanks again for the answering such a dumb question.
I have no experience with OpenNMS. You'd have to ask the OpenNMS guys.

Nils Breunese.
_______________________________________________
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
Support or consulting for your OTRS system?
=> http://www.otrs.com/
Lars Jørgensen
2008-02-07 08:53:49 UTC
Permalink
Post by Duane Owens
that I can preprocess the entire message in OTRS <before> the
PostMaster runs it through the parser? If I can, I can maybe
'rearrange' the message to move my X-OTRS-Headers into the email header.
You can't use the Postmaster Filter in SysConfig?

I use it to automatically assign queue and priority by inserting X-OTRS-Headers into mails coming from our monitoring system.
--
Lars
Duane Owens
2008-02-07 14:53:41 UTC
Permalink
How do you assign a variable coming from the nms?

For example, different devices in my nms have different SLA's associated
with them that are stored in the asset record of the nms. The SLA may get
changed in the asset record. In either case, it would be impractical to
setup the filter to compare for each one.

Am I missing something?

Duane

-----Original Message-----
From: otrs-***@otrs.org [mailto:otrs-***@otrs.org] On Behalf Of Lars
Jørgensen
Sent: Thursday, February 07, 2008 1:54 AM
To: User questions and discussions about OTRS.org
Subject: RE: [otrs] X-OTRS-Headers - Usage
Post by Duane Owens
that I can preprocess the entire message in OTRS <before> the
PostMaster runs it through the parser? If I can, I can maybe
'rearrange' the message to move my X-OTRS-Headers into the email header.
You can't use the Postmaster Filter in SysConfig?

I use it to automatically assign queue and priority by inserting
X-OTRS-Headers into mails coming from our monitoring system.
--
Lars
_______________________________________________
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
Support or consulting for your OTRS system?
=http://www.otrs.com/
Lars Jørgensen
2008-02-07 15:42:34 UTC
Permalink
Post by Duane Owens
How do you assign a variable coming from the nms?
I'm not sure I understand what you need. This is how the filter works:

NMS -> Postmaster Filter -> OTRS

So the Postmaster Filter is a preprocessor. It can examine the mail sent to OTRS and alter it before it is delivered into OTRS. You can use regular expressions to search for things in the message and assign queues, priorities and other things before OTRS receives the mmessage. The PostMaster Filter actually inserts the X-OTRS-Headers into the message.

If the mail sent from NMS doesn't contain enough information for OTRS to automatically decide what to do with it, then you can't use the Postmaster Filter and you have to make NMS put the info you need into the mail.
--
Lars
Duane Owens
2008-02-07 16:01:53 UTC
Permalink
Thanks for the patience and insights Lars,

So, for example.

If I have an email that comes in with 'X-OTRS-CustomerNo: SKY' in the body
(I know it's supposed to be in the header but the nms places it into the
body); I understand that I can use a regexp to match the 'X-OTRS-CustomerNo'
element. But, how do I:

1) Remove the X-OTRS header that is actually in the body.
2) Place the variable 'SKY' into the actual X-OTRS-CustomerNo header?

Could you give me an example based upon mine?

Duane

-----Original Message-----
From: otrs-***@otrs.org [mailto:otrs-***@otrs.org] On Behalf Of Lars
Jørgensen
Sent: Thursday, February 07, 2008 8:43 AM
To: User questions and discussions about OTRS.org
Subject: RE: [otrs] X-OTRS-Headers - Usage
Post by Duane Owens
How do you assign a variable coming from the nms?
I'm not sure I understand what you need. This is how the filter works:

NMS -> Postmaster Filter -> OTRS

So the Postmaster Filter is a preprocessor. It can examine the mail sent to
OTRS and alter it before it is delivered into OTRS. You can use regular
expressions to search for things in the message and assign queues,
priorities and other things before OTRS receives the mmessage. The
PostMaster Filter actually inserts the X-OTRS-Headers into the message.

If the mail sent from NMS doesn't contain enough information for OTRS to
automatically decide what to do with it, then you can't use the Postmaster
Filter and you have to make NMS put the info you need into the mail.
--
Lars
_______________________________________________
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
Support or consulting for your OTRS system?
=http://www.otrs.com/
Duane Owens
2008-02-08 16:57:54 UTC
Permalink
Lars,

I got it working... I used the perl NET::POP3 module and wrote a script to
read each message in. Then I just re-arranged the X-OTRS-Header messages to
the top of the message and piped the whole mess out to Postmaster.pl.

Regards

Duane

-----Original Message-----
From: otrs-***@otrs.org [mailto:otrs-***@otrs.org] On Behalf Of Lars
Jørgensen
Sent: Thursday, February 07, 2008 8:43 AM
To: User questions and discussions about OTRS.org
Subject: RE: [otrs] X-OTRS-Headers - Usage
Post by Duane Owens
How do you assign a variable coming from the nms?
I'm not sure I understand what you need. This is how the filter works:

NMS -> Postmaster Filter -> OTRS

So the Postmaster Filter is a preprocessor. It can examine the mail sent to
OTRS and alter it before it is delivered into OTRS. You can use regular
expressions to search for things in the message and assign queues,
priorities and other things before OTRS receives the mmessage. The
PostMaster Filter actually inserts the X-OTRS-Headers into the message.

If the mail sent from NMS doesn't contain enough information for OTRS to
automatically decide what to do with it, then you can't use the Postmaster
Filter and you have to make NMS put the info you need into the mail.
--
Lars
_______________________________________________
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
Support or consulting for your OTRS system?
=http://www.otrs.com/
Loading...