How to filter emails by multiple From addresses?

Applies to: Policies with the Exchange channel selected. 

The Headers filter section under Policy > Additional Filtering allows you to filter emails based on their header values. To match either of several addresses in the From header, combine the addresses in a single entry using a regular expression. 

Example 

To match emails whose From header contains either user1@domain1.com or user2@domain2.com: 

  1. Open the policy and navigate to Additional Filtering. 

  1. Enable Headers filter. 

  1. Add a single entry with From as the header name. 

  1. Specify the following regular expression as the value: 

(?:user1@domain1\.com|user2@domain2\.com) 

The | operator means OR, so the filter matches either address. The \. matches a literal dot in each domain name. 



 


Why use a single entry? 

Separate header filter entries are combined using AND. If you create two From entries, one for each address, the email must match both entries to satisfy the filter. 

To match either address, combine them in one entry using |, as shown above.