My problem: I want to filter emails that our staff ( this applies to both agents and non-agents ) receive from our Freshdesk. I also want this filtering to not be fooled by emails we receive from other Freshdesk installations ( we were glad to discover that some partners also use it ).
Possible solution: Freshdesk could add something in the headers that uniquely identifies an outgoing email as coming from a specific account and indicate the type of email ( notification or not ).
For example, Freshdesk could add an X-Fresdesk-Source custom header.
In this case, if my Freshdesk account is myaccount ( => myaccount.freshdesk.com ) then:
X-Fresdesk-Source: freshdesk_myaccount_notification_agent
means that the email is an agent ( = Agent Notifications tab ) notification from myaccount
X-Fresdesk-Source: freshdesk_myaccount_notification_requester
means that the email is a requester ( = Requester Notifications tab ) notification from myaccount
X-Fresdesk-Source: freshdesk_myaccount_notification_cc
means that the email is a cc ( = CC Notifications tab ) notification from myaccount
X-Fresdesk-Source: freshdesk_myaccount_reply
means that the email is a reply ( = Reply Templates tab ) from myaccount
etc
The list is not complete as it should include, for example, qualifiers for emails generated through ticket watch or rules but it illustrates the idea.
Using this I could then create rules in my Mail Client that use conditions based on data from that header.
Example:
If I want everything from myaccount moved to a specific folder then I would use this ( partial ) match:
X-Fresdesk-Source: freshdesk_myaccount_
or just freshdesk_myaccount_
If I want all notifications from myaccount moved to a specific folder then I would use this ( partial ) match:
X-Fresdesk-Source: freshdesk_myaccount_notification_
or just freshdesk_myaccount_notification_
I can also be specific and target only agent notification with a full match:
X-Fresdesk-Source: freshdesk_myaccount_notification_agent
or just freshdesk_myaccount_notification_agent
Obviously, any recipient could also benefit from this to categorize Freshdesk generated emails ( ours and from anyone else ).
An added benefit is that since the account is mentioned specifically ( i.e. myaccount ) the filters will not be fooled when processing email from another Freshdesk account ( like the account of one of our partners or customers ).
PS1: I have though about other ways but none is satisfactory:
- Message-ID: References: Received: and other system headers should not be touched in any way.
- Subject: is not ideal for a number of reasons, including:
- Adding this info ( account identifier plus identifiers for notification/reply/etc type ) to the subject of every outgoing email would lead to some very ugly and confusing/intimidating subjects.
- Some emails like watch or rule generated ones, have subjects I cannot configure.
- When I change a subject, even a little, everyone will have to change their rules. A particularly bad case of that is when someone else is using a subject like mine ( because, for example, they saw our subjects and thought it would be nice to copy them ), forcing me to change everything in order that our rules do not mistake their emails for ours.
PS2: I use the underscore '_' as the separator of qualifiers above ( as in freshdesk_myaccount_notification_agent ) but this is a poor choice. A better choice is some character that myaccount ( the Freshdesk account name ) is not allowed to contain, so that I could reliably process this header if needed.

