With a Pre-Proc Script, Drop an Email if the Email is a Calendar/Meeting Invite
Any Headers you wish to alter must be in the Matching Headers csv, or they will not be processed!
since 4.1.4
A mailbox may receive emails from invites, such as a Google Calendar meeting invite, that results in issue creation that you do not want. The following is a solution that should prevent issue creation, and result in the dropped outcome, when there is a header with a standard/predictable value (e.g., Google meeting invites includes: Sender: Google Calendar calendar-notification@google.com) which is added when the email is a calendar/meeting invite.
Example Email
MIME-Version: 1.0
Received: by 10.223.112.12 with HTTP; Sat, 18 Jun 2011 22:42:26 -0700 (PDT)
Date: Sun, 19 Jun 2011 17:42:26 +1200
Sender: Google Calendar calendar-notification@google.com
Message-ID: BANLkTinB1mfSh+GwOXGNWoL4SyDvOpdBoQ@mail.gmail.com
Subject: This is a starting email template, update as required
From: admin@localhost
To: catchemail@catch
Content-Type: text/plain; charset=UTF-8
some textExample Script
Update senderHeaderVal.contains("calendar-notification@google.com") with the relevant Header value to check against.
/*Retrives the value of the sender header and checks if the value contains the standard google calendar email address*/
var senderHeader = headerBeans.get('sender');
if (senderHeader !== null) {
var senderHeaderVal = senderHeader.getOriginalVal();
if (senderHeaderVal !== null && senderHeaderVal.contains("calendar-notification@google.com")) {
/*drops the email so no issue is created or commented on*/
jemhUtils.dropMessage("The received email is a google calendar invite");
}
}