Prefix Subject with Postmaster Filter

Moderator: crythias

Post Reply
gob
Znuny newbie
Posts: 55
Joined: 18 Jan 2011, 15:45
Znuny Version: 3.0.4

Prefix Subject with Postmaster Filter

Post by gob »

Hi
I want to add a prefix to the Subject line of an incoming email on a specific queue.
I have managed to add the prefix by setting X-OTRS-Title and the prefix appears but I cannot get it to be followed by the original subject.
Through my research I have tried the following:
[***] - adds the "To:" email address after the prefix

Anything else just repeats the text set in the filter such as:
[Subject] - just adds "[Subject]
[<OTRS_CUSTOMER_SUBJECT[30]>]

Any suggestions?
root
Administrator
Posts: 4294
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Prefix Subject with Postmaster Filter

Post by root »

Hi,

You need to grab the subject in the filter section:
Search header field Subject for value (.+)
and use this in the set header section.

X-OTRS-Title => PREFIX [***]

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
gob
Znuny newbie
Posts: 55
Joined: 18 Jan 2011, 15:45
Znuny Version: 3.0.4

Re: Prefix Subject with Postmaster Filter

Post by gob »

I'm afraid that didn't work Roy

The settings I have are:

Search Header Fields:

Code: Select all

Subject  >>  (.+)
To  >>  EMAILADDRESS:example@domain.com 
Set Email Headers

Code: Select all

X-OTRS-Queue  >>  Queue 1
Z-OTRS-Title  >>  URGENT [***}
This however gives the following Title / Subject after processing the ticket with the postmaster filter:

Code: Select all

URGENT example@domain.com
So it seems that [***] is pulling in the TO: email address instead of the Subject.
root
Administrator
Posts: 4294
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Prefix Subject with Postmaster Filter

Post by root »

Hi,

Looks like there is already a matching group, then you should use named matches. There is a description how to use them at the left side when you edit the PostMaster Filter.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Post Reply