Control spam, automated, and mass emails in E2CP using saved Inbound Email Headers
Within Email to Case Premium, Admins can enter a list of keywords to specify which email headers on inbound messages should be stored on the related Email Message object. Saving these headers can be helpful to avoid spam and out-of-office emails from interfering with your organization's intended use of E2CP. Instead of consuming storage space by saving every header, this feature allows admins to preserve only those that are necessary to build workflow and automation as needed. This article provides two sample Workflow Rules with Field Updates for use with inbound email headers.
In the examples below, we will use the values entered in the Save Inbound Email Headers setting from within the Email to Case Premium setup wizard to create useful workflow automation on the Email Message object.
A few helpful email headers
"X-Autoreply: yes" (some sort of automated email like an Out of Office message)
"Precedence: bulk" (some sort of mass email, or possibly a transactional survey)
"Received-SPF: fail" (might indicate spam)
When used in coordination with the Email Distribution feature (a premium add-on to E2CP via an extension package) and our application Case Flags, saved email headers can be used for a variety of purposes and actions. Below are two common examples.
Saved email headers can be used to distinguish an inbound Out of Office reply from the Case Owner, and prevent that email from clearing the flag on the Case. In the workflow rule below, we will ensure that any email from the Case Owner, except an Out of Office reply, should clear the flag.
1. Create the Workflow Rule
Incoming = True,
Parent.Owner:User.Email = FromAddress ,
NOT( CONTAINS( Headers , 'X-Autoreply: yes') )
2. Create the Clear Flag Field Update
Build and activate the rule below to avoid Spam and Phishing attempts, thus changing the owner of the Case to a Spam Queue and clearing the Case Flag. In this example we will cover Gmail specifically, though a similar approach will likely work with most email platforms and spam filters.
1. Your Gmail Administrator must "Add X-Gm-Spam header and X-Gm-Phishy header" as advised in the following support article: https://support.google.com/a/answer/2368151
2. In the General Settings section of the Inbound Configuration within the Email to Case Premium setup wizard, enter "X-Gm-Spam" as shown below, and click Quick Save at the bottom of the page.
3. If you do not already have one, create a Spam Queue to route spam and phishing attempts.
4. Create the Workflow Rule
CONTAINS(Headers, 'X-Gm-Spam: 1'),
NOT(ISPICKVAL( Parent.Account.Type , 'Customer')),
NOT(ISPICKVAL( Parent.Account.Type , 'Prospect'))
5. Create Field Update to Disable Email Distribution
6. Create Field Update to Change Owner to Spam Queue
7. Add the Field Update for Clear Flag
For further assistance, please contact your Salesforce administrator, Salesforce implementation partner, or your Internet Creations Account Executive to inquire about professional services.