Generic agent job and regular expression

Moderator: crythias

Post Reply
GLM
OTRS newbie
Posts: 22
Joined: 08 Nov 2012, 11:06
OTRS 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
OTRS guru
Posts: 2206
Joined: 13 Mar 2014, 09:16
OTRS 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
OTRS newbie
Posts: 22
Joined: 08 Nov 2012, 11:06
OTRS 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
Moderator
Posts: 2224
Joined: 18 Dec 2007, 12:23
OTRS Version?: 4/5/6
Real Name: Roy Kaldung
Company: Znuny Inc.
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
OTRS 5/6 CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Do you need professional services for the ((OTRS)) Community Edition? Check out https://www.znuny.com/

GLM
OTRS newbie
Posts: 22
Joined: 08 Nov 2012, 11:06
OTRS 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
Moderator
Posts: 2224
Joined: 18 Dec 2007, 12:23
OTRS Version?: 4/5/6
Real Name: Roy Kaldung
Company: Znuny Inc.
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
OTRS 5/6 CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Do you need professional services for the ((OTRS)) Community Edition? Check out https://www.znuny.com/

Post Reply