Setting the X-OTRS-CustomerUser-Field

Moderator: crythias

Post Reply
Octane
Znuny newbie
Posts: 57
Joined: 29 Mar 2017, 07:53
Znuny Version: Znuny 6.5.2
Real Name: Octane

Setting the X-OTRS-CustomerUser-Field

Post by Octane »

Hi,

I want to set the header "X-OTRS-CustomerUser" using a variable found in the eMail-subject. All of these eMails contain the same system-account as the sender but they also contain the real CustomerUser in a variable in the subject.

Example: an eMail with the subject "xyz %C xyz" arrives where "%C" represents the real CustomerUser. Now I want to set the "X-OTRS-CustomerUser"-Field to "%C".

Is this possible?

Thanks in advance!
Ciao
Octane
shawnbeasley
Znuny Employee
Posts: 132
Joined: 13 Sep 2021, 09:38
Znuny Version: Znuny 6.3.x
Real Name: Shawn Beasley
Company: Znuny

Re: Setting the X-OTRS-CustomerUser-Field

Post by shawnbeasley »

Not really sure what you mean by a Variable.

It's possible to match a part of the subject and save a part to a matching group xyz (%C) xyz, then apply this to X-OTRS-CustomerUser with [***].

See Instructions on the left side when creating a postmaster filter.
hint.png
Hope that helps.
You do not have the required permissions to view the files attached to this post.
Octane
Znuny newbie
Posts: 57
Joined: 29 Mar 2017, 07:53
Znuny Version: Znuny 6.5.2
Real Name: Octane

Re: Setting the X-OTRS-CustomerUser-Field

Post by Octane »

Hi shawnbeasley,

I will try to explain this in detail :-)

Requests for new useraccounts are created and submitted using a form on out intranet. The problem is that the sender is always identical, namely that of the application system on the intranet. However, the real sendername appears in the email subject and i would like to add it as OTRS-customer using "X-OTRS-CustomerNo".

To distinguish these emails from others we could additionally write a certain sequence in the subject, e.g. "xyz %C xyz" or "### %C" where %C is the sender and "xyz" or "###" is always the same filter-match. But from the instructions of the postmaster-filter and your reply I see that it is only possible to match a part of the subject and save this part to a matching group, then apply this to X-OTRS-CustomerUser with [***].
But we don't want to apply the match "xyz" or "###" but only a part of the subject followed by the match, the real sender name %C (this stands for the variable sender). I wonder if this is possible.

Thanks in advance!
Ciao
Octane
shawnbeasley
Znuny Employee
Posts: 132
Joined: 13 Sep 2021, 09:38
Znuny Version: Znuny 6.3.x
Real Name: Shawn Beasley
Company: Znuny

Re: Setting the X-OTRS-CustomerUser-Field

Post by shawnbeasley »

Octane wrote: 13 Jul 2022, 11:56 To distinguish these emails from others we could additionally write a certain sequence in the subject, e.g. "xyz %C xyz" or "### %C" where %C is the sender and "xyz" or "###" is always the same filter-match. But from the instructions of the postmaster-filter and your reply I see that it is only possible to match a part of the subject and save this part to a matching group, then apply this to X-OTRS-CustomerUser with [***].
But we don't want to apply the match "xyz" or "###" but only a part of the subject followed by the match, the real sender name %C (this stands for the variable sender). I wonder if this is possible.
Take a look at this blog posting here. This shows how to partially match.
Octane
Znuny newbie
Posts: 57
Joined: 29 Mar 2017, 07:53
Znuny Version: Znuny 6.5.2
Real Name: Octane

Re: Setting the X-OTRS-CustomerUser-Field

Post by Octane »

Cool, thanks a lot!

So I have to create a dynamic field (never done this before :lol: ) and a suitable expression. But the difference is that the field values in our case do not have a uniform length (checking for usernames!), is that a problem?
Ciao
Octane
Post Reply