Hi,
I need to filter the parts of a email body and set the found variable as customer.
My try at the regex is: EMAIL (([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}))
Example:
ABC aaabbbcccc
BBB test@test.com
CCC aaabbbcccddd
EMAIL otrs@otrs.org
DDD aaaabbbbb
Postmaster filter so far:
Match => {
From => 'test@test.com',
Body => 'EMAIL (([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}))'
},
Set => {
'X-OTRS-CustomerUser' =>[***],
},
What i want to do is fetch otrs@otrs.org from the EMAIL line and set the email only as CustomerUser.
Hence it needs to ignore the BBB line and only fetch from EMAIL.
PostMaster Filter parts of body with wildcard
Moderator: crythias
PostMaster Filter parts of body with wildcard
OTRS 3.0.11 , RHLE 5.6 & CentOS 6
MSSQL 2008 R2 , Windows 2008 R2
MSSQL 2008 R2 , Windows 2008 R2
Re: PostMaster Filter parts of body with wildcard
This seems to be a bit better but still doesn't put the result in the CustomerUser field:
(?<=EMAIL )(([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}))
(?<=EMAIL )(([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}))
OTRS 3.0.11 , RHLE 5.6 & CentOS 6
MSSQL 2008 R2 , Windows 2008 R2
MSSQL 2008 R2 , Windows 2008 R2
Re: PostMaster Filter parts of body with wildcard
It finds the correct line, but can't set a variable through:
'X-OTRS-CustomerUser' =>[***],
If i make it set aaa.aa@test.com statically it works.
So how to get the line it finds and use that in the CustomerUser field?
'X-OTRS-CustomerUser' =>[***],
If i make it set aaa.aa@test.com statically it works.
So how to get the line it finds and use that in the CustomerUser field?
OTRS 3.0.11 , RHLE 5.6 & CentOS 6
MSSQL 2008 R2 , Windows 2008 R2
MSSQL 2008 R2 , Windows 2008 R2
Re: PostMaster Filter parts of body with wildcard
do you have any solution for this? i have nearly the same problem
Produktiv: OTRS: 4.0.10
Testing": OTRS: 5
OS: Debian 7
Apache2/MySQL 5
Testing": OTRS: 5
OS: Debian 7
Apache2/MySQL 5
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: PostMaster Filter parts of body with wildcard
Agents/Responsible shouldn't reply to tickets through email.
viewtopic.php?f=60&t=11247
(Available as an add-on for Subscription Customers)
viewtopic.php?f=60&t=11247
(Available as an add-on for Subscription Customers)
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask