Automatic rejection if cc'd

Moderator: crythias

Post Reply
WarrenB
Znuny newbie
Posts: 9
Joined: 02 Feb 2013, 20:53
Znuny Version: OTRS 3.2.1
Real Name: Warren Bryington
Company: First Consulting Alliance

Automatic rejection if cc'd

Post by WarrenB »

We have a number of customers that are cc'ing our helpdesk address in their emails.
They often cc other people as well and we end up with tons of new tickets created if they reply to the original email.

I would like a way to:
1. Reject any emails that are cc'd (or bcc'd) to our helpdesk address.
2. Send an email advising the sender that their email was rejected.

I have a solution in place but it is not ideal:
1. I filter the email to a specific queue (only for cc though)
2. The queues responds with a auto-reply (but also opens up a new ticket - which is then included in the subject line).
3. The ticket is then closed automatically using a generic agent that runs every 5min.

Is there a way to use to use the X-OTRS-headers to reject the email so that an email still goes out?
X_OTRS ignore does work to reject completely - but then there is no response.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Automatic rejection if cc'd

Post by crythias »

Edit Config Settings in Ticket -> Core::PostMaster
[x] PostMaster::PreFilterModule###3-NewTicketReject
Match ->
CC | @domain.com

and the next 3 entries.

Haven't tested, but seems relevant.
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
WarrenB
Znuny newbie
Posts: 9
Joined: 02 Feb 2013, 20:53
Znuny Version: OTRS 3.2.1
Real Name: Warren Bryington
Company: First Consulting Alliance

Re: Automatic rejection if cc'd

Post by WarrenB »

Thanks for the info - I will look into that during the week.
In terms of the response I presume it will use "PostMaster::PreFilterModule::NewTicketReject::Body" etc for the message that goes back to the sender?

I have also found that some customers are including other people in the TO field (which creates the same problem).
I was going to use a simple regular expression .*@.*@ to scan to TO field to see if more than one address is included.

So I will end up with 2 criteria that could be matched in order to reject:
1. Email sent TO more than one person... TO | *@.*@
2. or Email sent CC | helpdeskaddress@mydomain

I do not think PostMaster::PreFilterModule###3-NewTicketReject will it be able to handle the multiple criteria (they are "OR" not "AND").
So will probably need a more complicated filter just using a regular expressions on the TO field.
WarrenB
Znuny newbie
Posts: 9
Joined: 02 Feb 2013, 20:53
Znuny Version: OTRS 3.2.1
Real Name: Warren Bryington
Company: First Consulting Alliance

Re: Automatic rejection if cc'd

Post by WarrenB »

I am using this as the regular expression to check the TO field:
(?!helpdeskaddress@mydomain)|(.*@.*@)

Any ideas on how to make this case-insensitive (I'm not sure what Perl accepts as flags)?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Automatic rejection if cc'd

Post by crythias »

Look for [, ;] perhaps, unless someone might show up as Doe, Jr.
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
Post Reply