Use Email Allowlisting and Blocklisting within a Profile?


You have lots of email, some of it may be good, some of it may be bad.  JEMH can help!

The Allowlisting section of JEMH looks like below:


What is Blocklisting

Blocklisting is when you provide an email address or regular expression that, if the sender (from: address) matches, will be prevented from being processed.  If a blocklisted entry is present, everything else is deemed good.

Blocklisted entries can be either forwarded (to the forward user) or dropped silently.  Of course, selecting drop will mean a badly constructed regular expression may cover addresses not intended.  Testing is advised!

Why blocklist/who to blocklist?

Common reasons to blocklist include Postmaster addresses, e.g. informing you that the recipient cannot be found (a legacy user /email address that no longer resolves).  Other automated senders are also good candidates.

Blocklist by subject?

JEMH Also has a subject blocklisting capability, which is global to all Profiles.  See the Blocklisting navigationTab.

What is Allowlisting

Allow-listing is when you provide an email address or regular expression that, if the sender (from: address) matches, will be treated as good.  If a allowlisted entry is present, everything else is deemed bad.

Processing Order

JEMH applies Blocklisting/Allowlisting checks through a Message Filter, a pluggable component.

  1. If the email has a matching global blocklisted subject, the message is marked 'bad'.

  2. If there are allowlisting entries (CSV), the sender is checked against each.  A failure to match indicates 'bad'.

  3. If there were no allowlisting entries, or the sender passed the allowlisting check, the blocklisting field, if present, is then used to check the sender against.  Any matches indicate 'bad'.

  4. If the email has been tagged as 'bad', the JEMH Profile Configuration is consulted to determine whether the email should be dropped or forwarded to the 'forward' user.


In the screenshot above, the following have been listed as blocklist entries, meaning all others are good:


  • postmaster@.*

The address field is regular expression sensitive. Note that the '*' character has special meaning in regexp, it means zero or more of the preceding character, not any character.  The dot '.' means any character except line, hence match all is '.*'. Therefore, it is best to escape dots with a backslash '\.', otherwise if left as a dot there is the chance that an unexpected address matches the regexp. For example:

"" would also allow the address "".

Restrict to an internal organisation only

Allowlisting to restrict inbound messages to only senders within an organisation can be achived with a simple regexp:

  • .*

 Remember to set a catchEmail / jemhAddresseeRegexp value to match your expected 'incoming' addresses to discount them from notifications/user creation.