How Catchemail mailbox addresses are identified
since JEMH 4.1.13
Summary
This page explains the source and order of email data used to identify ‘the’ inbound mailbox address for the processing of an email.
About Catchemail Mailbox addresses
Mailbox addresses are the addressee that end users send mail to, eg jira@yourco.com. Mailbox addresses are optional but recommended so that they never end up in email-user text custom fields. ALL mailbox addresses are excluded from addressee processing, regardless of whether a User has that address (no User should ever have a mailbox address, it causes mail loops).
Profile level Catchemail Addresses and Regexps
Mailbox addresses have historically been defined in Profile > Email > Catch Email Adddress, can be simple text addresses (jira@yourco.com) or a regular expression (.*-jira@yourco.com). Care must always be taken with wildcards, eg .*@yourco.com would match on ALL addresses in the @yourco.com domain, meaning ALL users would be excluded from addressee processing.
Mail Headers
Mail Headers like ‘Delivered-To’ can sometimes have the original addressee the mail was sent to (eg mail was sent BCC). JEMH allows you to nominate these headersProfile > Email > Catch Email Headers. Note: do not store standard headers (To,Cc,Bcc here), Catch Email Headers are not the same, are expected to hold only an email address of form user@domain.com (no personal part).
Addressee expansion
JEMH can where configued take addressees discovered through standard headers (To, Cc, Bcc) and use LDAP to expand ‘distribution group’ addresses to the constituent members. This enables JEMH to resolve the actual mailbox addressee involved, and exclude, breaking one source of mail loop.
Search sequence
Mail Headers (eg Delivered-To)
Recipients, added sequentially as discovered through (To, Cc, Bcc*).
Distribution List Recipients (expanded through LDAP)
* Bcc is never actually populated in ‘real life’ however, JEMH can populate this header during a pre-processing task.
Project Mapping Domain Rule : Addressees
Historically JEMH required all Mailbox addresses to be defined through Profile > Email > Catch Email Address, even if there were 1000 Domain Rules with addressee matches. This was addressed in JEMH 4.1.12, where we now resolve Catch Email Addresses through Addressee Domain Rules as well.
Advisories about duplicate Profile > Email > Catch Email Address
Where an Addressee Domain Rule is found to match a standard Profile > Email > Catch Email Address, an advisory is added indicating that the Profile > Email > Catch Email Address could be redundant - its always possible that the Profile > Email > Catch Email Address value is more general in scope (eg .*-jira@domain.com) and the addressee expression is more specific (eg sales-jira@domain.com). Removal of Profile > Email > Catch Email Address should be considered on a case by case basis!
How to scale mail processing
Having less mailboxes improves scalability of mail retrieval, having one mailbox with many aliases is much faster than having many mailboxes
Mailbox aliases
Mail server | Supported |
|---|---|
Gmail |
|
o365 |
|
Microsoft Exchange |
|
Routing mail from multiple mailboxes into one mailbox (mailbox aliases) is supported by JEMH because with mailbox aliases the “Delivered-To” header typically contains the alias address, which JEMH can identify and use as a catch email address for processing.
Sub-addressing
Sub-addressing is another method of scaling mail processing because only one mailbox is required (the sub address can be in the “To” header), and JEMH can differentiate between the different sub-addresses and, therefore, can process the email. For more information on sub-addresses, please see: Plus Addressing in Exchange Online
Configuring JEMH to use these addresses
The only feature required in JEMH to scale mail processing is “Catch Email Address” because, by adding the alias or the sub-address as a Catch Email Address, JEMH knows to process the email if it contains this email address as a recipient. For more information about Catch Email Addresses: Email Selection | Catch Email Address
The Catch Email Address can be defined within one of the following two sections:
Profiles > Configure > Email > Email Selection > Catch Email Address
Profiles > Configure > Project Mapping, clicking edit on the relevant mapped Project Mapping and setting up a Domain Rule that matches against the addressee. For more information on Project Mappings and Domain Rules, please see:
Want to store the catch email address
This is done in a Custom Field Default, see Velocity Script Custom Field Defaults :
$jemhUtils.getCatchEmailAddress().getAddress()