[otrs] Postmaster Filter

4 views
Skip to first unread message

Jan.D...@bertelsmann.de

unread,
Mar 22, 2011, 7:59:58 AM3/22/11
to ot...@otrs.org

Hi,

 

I want to give some freetext input in header information of incoming mails.

example:

---8< --

From: cust...@domain.de
To: otrsre...@mydomain.de

Message-ID: <25012212.91300793495185.JavaMail.some@host>
Subject: some infotext [Ticket# 841401199864]
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_Part_9_546520.1300793495185"
Articlefreekey1: MY_ID
Articlefreevalue1: 1401199864
Articlefreekey2: MY_CONTACT_NAME

Articlefreevalue2: User%20Name

---8< ---

 

Is it possible to put these variables (Articlefreekey1, …) into the database somehow?

 

Greetings

Jan Dreyer

 

Martin Edenhofer

unread,
Mar 22, 2011, 8:31:11 AM3/22/11
to User questions and discussions about OTRS.
Hi Jan,

it is. http://doc.otrs.org/3.0/en/html/adminarea-postmasterfilter.html -> Table 5.4. Function of the different X-OTRS-headers

.... 
X-OTRS-ArticleKey(1|2|3):Additional info key for the article.Saves an additional info key for this article.
X-OTRS-ArticleValue(1|2|3):Additional info value for the article.Saves an additional info value for the article.

PS: If you want to have it a ticket level, use "X-OTRS-TicketKey" and so on.

 -Martin

Jan.D...@bertelsmann.de

unread,
Mar 22, 2011, 8:36:51 AM3/22/11
to ot...@otrs.org

Hi Martin,

 

thanks. I already found that, sorry for not mentioning. But I do need some more: I want to set the value for “X-OTRS-ArticleKey” to that delivered by the mail.

e.g. one mail has

Articlefreekey1: MY_ID

and I want to set X-OTRS-ArticleKey to “MY_ID”

 

another mail has

Articlefreekey1: SOME_OTHER

and I want to set X-OTRS-ArticleKey to “SOME_OTHER”

 

I don’t see in the documentation how to do that (if possible at all).

 

Greetings

Jan Dreyer

Martin Edenhofer

unread,
Mar 22, 2011, 8:47:03 AM3/22/11
to User questions and discussions about OTRS.
Hi Jan,

now I understand your use case a little bit more. :)

You need a mail header rewrite from "Articlefreekey1" to "X-OTRS-ArticleKey", right? There is no out of the box mail header rewrite feature in OTRS it self. I see two possible solutions:

a) Create an own postmaster module for the header rewriting (perl coding skills required)

b) Use procmail/formail for modifying incoming emails (it's unix stuff, some unix knowledge needed)

Greetings,

 -Martin

Nils Leideck

unread,
Mar 22, 2011, 8:52:01 AM3/22/11
to User questions and discussions about OTRS.
Hi Martin,

I don’t want to own the master, but isn’t it easier to add a Match Header to the SysConfig (Ticket -> Core::PostMaster) and use a regex to match for the value of that new header (.*) and set it in the X-OTRS-ArticleKey1 value with [***] ?

*g* ... *duckt sich schon mal* ...

Cheers, Nils

---------------------------------------------------------------------
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

-- 
Nils Leideck
http://webint.cryptonode.de / a Fractal project

Martin Edenhofer

unread,
Mar 22, 2011, 8:59:43 AM3/22/11
to User questions and discussions about OTRS.
Nils, that's is a good idea! :)

You just need to add the used "Articlefreekey... and Articlefreetext..."-Headers via SysConfig also to "PostmasterX-Header" first, then it should work fine. :)

Cool! $Nils++ :)

 -Martin
Reply all
Reply to author
Forward
0 new messages