Hello everyone.
I need to know how I can populate 3 dynamic fields by filtering some information from the body of a forwarded email. I currently use this filter (I have installed the EnhancedPostmasterFilter extension) to compile 1 dynamic field (EMAIL) with the first e-mail that is identified on the body of the e-mail:
Check email header: body
Look for value: ((? <A1> \ b [A-Z0-9 ._% + -] + @ [A-Z0-9 .-] + \. [A-Z] {2,4} \ b))
Email header set: X-OTRS-DynamicFiled-EMAIL
Set value: [** \ A1 **]
I would need to be able to compile 3 dynamic fields with 3 list of email addresses.
Email body example:
----------------------------------------------------------------------------------------------
Asdhushuadyy,
saduyasyuduaysd asyuhdyuhasdhyu
ashduyhyusadhyusadyhuasd.
Greets.
Da: xxxxxxx@xgmail.com [mailto:xxxxxxx@xgmail.com]
Inviato: domenica 8 aprile 2018 12:03
A: 'xxxxxxx@xlibero.it' <xxxxxxx@xlibero.it>; 'asd@xlibero.it' <asd@xlibero.it>
Cc: 'prova1@prova.it' <dsfsdffds>; 'prova2@prova.it' <prova2@prova.it>; 'prova3@prova.it' <prova prova>; 'prova4@prova.it' <prova4@prova.it>
Oggetto: nananananananan nanananana
Asdasdasdasdsadsadsad
Asd
Sadsa
Das
Das
Dsadasdasddas provovrovorvorprvorvprov
----------------------------------------------------------------------------------------------
Final results:
DynamicField_1DA: xxxxxxx@xgmail.com
DynamicField_2A: xxxxxxx@xlibero.it; asd@xlibero.it
DynamicField_3Cc: prova1@prova.it; prova2@prova.it; prova3@prova.it; prova4@prova.it
Thanks.
Need help with postmaster filter OTRS 5.0.x
Moderator: crythias
-
- Znuny newbie
- Posts: 7
- Joined: 05 Apr 2018, 20:39
- Znuny Version: 6.0.x
- Real Name: Alessandro
Need help with postmaster filter OTRS 5.0.x
OTRS 5.0.x, ITSM, Zuny4OTRS
CentOS 7
CentOS 7
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Need help with postmaster filter OTRS 5.0.x
Try:
Code: Select all
(?<Da> ^Da: \s* [A-Z0-9 ._% + -] + @ [A-Z0-9 .-] + \. [A-Z] {2,4} \ b) .*? (?<A> ^A: \s* [A-Z0-9 ._% + -] + @ [A-Z0-9 .-] + \. [A-Z] {2,4} \ b) .*? (?<Cc> Cc: \s* [A-Z0-9 ._% + -] + @ [A-Z0-9 .-] + \. [A-Z] {2,4} \ b)
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Znuny newbie
- Posts: 7
- Joined: 05 Apr 2018, 20:39
- Znuny Version: 6.0.x
- Real Name: Alessandro
Re: Need help with postmaster filter OTRS 5.0.x
First of all, thank you. Unfortunately, inserting this filter in my system does not work.
If I cut the string and I use a single filter for "Da:" field it works. If I add more filters (Stop after match: no) my dynamic fields stay blank.
I try to attach an image to explain how I used your filter. I had to modify the PostMaster template to add more than 100 chars.
Maybe this change can brake the postmaster filter system?
If I cut the string and I use a single filter for "Da:" field it works. If I add more filters (Stop after match: no) my dynamic fields stay blank.
I try to attach an image to explain how I used your filter. I had to modify the PostMaster template to add more than 100 chars.
Maybe this change can brake the postmaster filter system?
You do not have the required permissions to view the files attached to this post.
OTRS 5.0.x, ITSM, Zuny4OTRS
CentOS 7
CentOS 7