MPmail - regex examples

Created by Chris Black, Modified on Wed, 25 May, 2022 at 2:55 PM by Chris Black

Description


Some examples of using regex in a compliance filter rule


Requirements


An admin level login to MPmail


The Process


Expression

Rule Type

Plain Text Explanation

\@.*(\.au)

Variant
 \@.*(\.in.net)

Advanced

You can use this expression in the From: field of the compliance filter to match any TLD email envelope From: addresses with the .au end suffix all inbound from testdomain.au subdomain.testdomain.com.au

\@.*(\.au|\.nz)\$ 

Advanced

You can use this expression in the From: field of the compliance filter to match any TLD envelope From: email addresses with the .au or .nz end suffix end expression with \$ to ensure processing ends after the full string

(gb2312)

Header

You can use this expression to block the Chinese ISO character set as a header compliance filter rule

54.124.100.1*

Advanced

Block specific IP addresses with a wild card

s(ean)?stitt.* 

Advanced

Can be used to capture inbound emails to users (To:)  

An example would be: 

sean@manageprotect.com or sstitt@manageprotect.com 

The domain is not evaluated, although you can extend the expression domain specific

s(ean)?stitt.*\@manageprotect\.com

\@.*(manageprotect.*)

Advanced

Can be used to capture inbound emails to users (From) an envelope senders email address containing the exact words manageprotect within the domain name

\@.*\..*\..*

Advanced

Can be used to capture inbound emails to users (From) an email address from any Sub-domain

Example:
 test.manageprotect.com

(.docm\b|.xls\b)

Variant:

(.xls\b|.xlsm\b|.doc\b)

Advanced

Used to capture multiple file extensions within the compliance filter attachment section.

Note: If using .xls the system will continue to process to .xlsm if you do not add \b after the extension 

(.*subject1|.*subject2)

Advanced

Can be used to insert multiple subjects

(\.*ECHOSIGN\b .* please sign\b.*)

Advanced

Can be used to ensure that several keywords are contained within a subject before a match is applied. A single keyword will not activate the rule, this is an inline and statement

(From:.*<.*\anyuser@hotmail.com>.*)

Header

Can only be used as a header rule.

 This will capture MIME from senders.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article