[SOLVED]More Email Header for PostMaster Mail
Moderator: crythias
[SOLVED]More Email Header for PostMaster Mail
Hi!
I configured the PostMaster Mail Account and Ireceived in OTRS the incoming mails. I configured the PostMaster Filter but I only have 4 Headers to sort.
If i want more, should i configure more than 4 headers in config.pl?
Thanks
I configured the PostMaster Mail Account and Ireceived in OTRS the incoming mails. I configured the PostMaster Filter but I only have 4 Headers to sort.
If i want more, should i configure more than 4 headers in config.pl?
Thanks
Last edited by Gonzalo on 10 Mar 2015, 13:16, edited 1 time in total.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: More Email Header for PostMaster Mail
if you really need to scan more, just add another filter.
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
Re: More Email Header for PostMaster Mail
HI @crythias
I don't know how can I add more email header or filter condition to more complex PostMaster. I attach a image where i need more email header.
Thanks for the help.
I don't know how can I add more email header or filter condition to more complex PostMaster. I attach a image where i need more email header.
Thanks for the help.
You do not have the required permissions to view the files attached to this post.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: More Email Header for PostMaster Mail
Pre OTRS 4.x you had to hardcode more filtesr in the .dtl files.
My advice would be to upgrade to 4.x, there you can configure the amount of filters in the SysConfig (where the deafult is 12 or something).
My advice would be to upgrade to 4.x, there you can configure the amount of filters in the SysConfig (where the deafult is 12 or something).
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Re: More Email Header for PostMaster Mail
Thank you RStraub!
I changed the AdminPostMasterFilter.dtl to add more fields for both (Filter Condition and Email headers).
Last question, is it possible to catch some values for filter conditions in the Header-Body, for example SLA and Service. Because if I set up to header with the same type, I click submit but OTRS only save one type of header.
Thank you.
I changed the AdminPostMasterFilter.dtl to add more fields for both (Filter Condition and Email headers).
Last question, is it possible to catch some values for filter conditions in the Header-Body, for example SLA and Service. Because if I set up to header with the same type, I click submit but OTRS only save one type of header.
Thank you.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: More Email Header for PostMaster Mail
What exactly do you mean? You want to catch multiple values?
The filter is a regex field, you could type (as shown in the example at the bottom of the page):
(me|you|everybody)@testdomain.com
The filter is a regex field, you could type (as shown in the example at the bottom of the page):
(me|you|everybody)@testdomain.com
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
-
- 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: More Email Header for PostMaster Mail
For each header field, you can use only one filter rule... You have to combine the regular expressions. If you give more details about what you want to achieve, we could help...
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
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: More Email Header for PostMaster Mail
When I said, add a filter, I mean, add a filter, not a filter condition.
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
Re: More Email Header for PostMaster Mail
I read my reply and I explained bad.
I try to explain better:
For example if I received a incoming email from the customer with this format:
[From]: @customer.com
[Body]:
Description of the incident/request: Description...
SLA: Incident High
Service: Support 1
Prioriry: High
Is it possible to capture all the value in only one filter condition (four in the example) and only in one rule with the header Body?
Should I create four differents rules for capture the four values (in the case of this example)? I know that the value of Stop after mutch must be NO.
Other thing is that the Body Header only read the first line. ¿How can i dela with?
I understood that with regexpre I can filter differents values (me or you or everybody with the domain @testdomain.com) (me|you|everybody)@testdomain.com, but is there any way to use 'AND' expression in case of OR. maybe with &? I try with & but now work for me.
Thanks a lot.
I try to explain better:
For example if I received a incoming email from the customer with this format:
[From]: @customer.com
[Body]:
Description of the incident/request: Description...
SLA: Incident High
Service: Support 1
Prioriry: High
Is it possible to capture all the value in only one filter condition (four in the example) and only in one rule with the header Body?
Should I create four differents rules for capture the four values (in the case of this example)? I know that the value of Stop after mutch must be NO.
Other thing is that the Body Header only read the first line. ¿How can i dela with?
I understood that with regexpre I can filter differents values (me or you or everybody with the domain @testdomain.com) (me|you|everybody)@testdomain.com, but is there any way to use 'AND' expression in case of OR. maybe with &? I try with & but now work for me.
Thanks a lot.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: More Email Header for PostMaster Mail
note that if you somehow know how to format an email that fills this as specified, you're just as likely to make the fields in the header.
X-OTRS-SLA: Incident High
X-OTRS-Priority: High
X-OTRS-Service: Support 1
But, since *all* PostMasterFilters are processed (unless you indicate "Stop after this one"), generally in ABC order of label, you could very well have effectively had one PostMasterFilter that looks for Service: in the body and adjusts the service separately and another that looks for Priority and adjusts the priority.
Edit to add: Do one thing at a time, do it well, and know that granularity means you can troubleshoot or disable/enable one thing at a time without making the whole part fail on a poor inadvertent change or misspelling.
X-OTRS-SLA: Incident High
X-OTRS-Priority: High
X-OTRS-Service: Support 1
But, since *all* PostMasterFilters are processed (unless you indicate "Stop after this one"), generally in ABC order of label, you could very well have effectively had one PostMasterFilter that looks for Service: in the body and adjusts the service separately and another that looks for Priority and adjusts the priority.
Edit to add: Do one thing at a time, do it well, and know that granularity means you can troubleshoot or disable/enable one thing at a time without making the whole part fail on a poor inadvertent change or misspelling.
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
-
- 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: More Email Header for PostMaster Mail
This is what http://opar.perl-services.de/dist/Enhan ... lter-4.0.1 is for.
In your case:
Check Header1: From => \@customer\.com
Check Header2: Body => SLA:\s+(?<sla>.*?)\r?\nService:\s+(?<service>.*?)\r?\nPriority:\s+(?<priority>.*?)
Set Header1: X-OTRS-SLA => [**\sla**]
Set Header2: X-OTRS-Service => [**\service**]
Set Header3: X-OTRS-Priority => [**\priority**]
In your case:
Check Header1: From => \@customer\.com
Check Header2: Body => SLA:\s+(?<sla>.*?)\r?\nService:\s+(?<service>.*?)\r?\nPriority:\s+(?<priority>.*?)
Set Header1: X-OTRS-SLA => [**\sla**]
Set Header2: X-OTRS-Service => [**\service**]
Set Header3: X-OTRS-Priority => [**\priority**]
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
Re: More Email Header for PostMaster Mail
Thanks everybody!
I am trying to build a Regular expresion like @reneeb explain me.
I am trying to build a Regular expresion like @reneeb explain me.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
Re: More Email Header for PostMaster Mail
Hi again!
I have problem to capture the second line of the body with this regular expression:
RegExp
\s*SLA:\s*(Incidencia Media.*)\r+?\n\s*Tipo:\s*(Incidencia.*)
Input:
SLA: Incidencia Media
Tipo: Incidencia
I try in a RegExpre Tester and it works but in OTRS doesn't work ¿Someone see anything wrong?
Thanks
I have problem to capture the second line of the body with this regular expression:
RegExp
\s*SLA:\s*(Incidencia Media.*)\r+?\n\s*Tipo:\s*(Incidencia.*)
Input:
SLA: Incidencia Media
Tipo: Incidencia
I try in a RegExpre Tester and it works but in OTRS doesn't work ¿Someone see anything wrong?
Thanks
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
-
- 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: More Email Header for PostMaster Mail
Incidencia Media should be Incidencia\s+Media, I think
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
Re: More Email Header for PostMaster Mail
Hi reneeb!
I try to use Incidencia\s+Media but it doesn't work.
Anyone know what is the problem? Because if I separate the rule in two different \s*SLA:\s*(Incidencia Media.*)\r+?\n\ and \s*Tipo:\s*(Incidencia.*) its works but together not. I think that the RegExp didn't "read" the second line.
Thanks
I try to use Incidencia\s+Media but it doesn't work.
Anyone know what is the problem? Because if I separate the rule in two different \s*SLA:\s*(Incidencia Media.*)\r+?\n\ and \s*Tipo:\s*(Incidencia.*) its works but together not. I think that the RegExp didn't "read" the second line.
Thanks
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
Re:More Email Header for PostMaster Mail
Hi!
I found the problem,I deleted the Carriage return and now works.
Thanks everybody for the help!
I found the problem,I deleted the Carriage return and now works.
Thanks everybody for the help!
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database