Generic agent job and regular expression

Moderator: crythias

Post Reply
GLM
Znuny newbie
Posts: 22
Joined: 08 Nov 2012, 11:06
Znuny Version: 6.0.23
Real Name: Gonzalo López Menéndez
Company: GRUPO MEANA, S.A.

Generic agent job and regular expression

Post by GLM »

Hello,

Our database has a bunch of email tickets classified as spam by our bayesian filter. The subject in all tickets is [spam] some text. I have created a generic agent job to move them all to the Junk queue but no records are found. I have tried the following content for the subject field:

\[spam\]
"\[spam\]"


I am not sure what regular expression matches [spam] some text.

Thank you for your help.

Regards.
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Generic agent job and regular expression

Post by RStraub »

Could you post some screenshots of your config? Also note that OTRS distinguishes between subject and title.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
GLM
Znuny newbie
Posts: 22
Joined: 08 Nov 2012, 11:06
Znuny Version: 6.0.23
Real Name: Gonzalo López Menéndez
Company: GRUPO MEANA, S.A.

Re: Generic agent job and regular expression

Post by GLM »

Hello,

Thank you for your response.
Yestarday I have read that regex is not supported in generic agent jobs. Too bad.

Regards.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Generic agent job and regular expression

Post by root »

Hi,

Why don't use PostMaster Filter? They are a proper way to deal with e-mails.

- 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 ?
GLM
Znuny newbie
Posts: 22
Joined: 08 Nov 2012, 11:06
Znuny Version: 6.0.23
Real Name: Gonzalo López Menéndez
Company: GRUPO MEANA, S.A.

Re: Generic agent job and regular expression

Post by GLM »

Hello,

Problem is that messages tagged as spam must be reviewed looking for false positives. No way to automate spam handling in our production environment. In our test environment tickets tagged as spam can be deleted w/o further analisys, so I was thinking about a generic agent job since we have a bunch of spam tickets created before a Postmaster filter was in place.

Thank you for your attention.

Best regards.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Generic agent job and regular expression

Post by root »

Hi

Then you should use the PostMaster filter to set a dynamic field to a specific value if the subject contains [spam].
Maybe a dropdown called Spam with yes, no, probably, use SysConfig TicketDynamicFieldDefault to set it by default to no, change it with the PostMaster Filter to probably and manually by an agent to yes or no.

- 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