Loading
Prepare for Email to Become the Default Login ExperienceRead More
Salesforce Enforces New Security Requirements in Summer 2026Read More
Sales Productivity
Set Up an Email Domain Filter

Set Up an Email Domain Filter

An email domain filter determines whether an email relay is restricted to specific domains. You can create multiple domain filters and set their priority order using the EmailDomainFilter object in the SOAP API. An email domain filter must be set up for email relay to work.

Required Editions

Available in: Salesforce Classic and Lightning Experience
Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions
User Permissions Needed
To configure an email domain filter: Email Administration, Customize Application, and View Setup

If you plan to activate bounce management and email compliance management, confirm with your email admin that your company allows relaying email sent from Salesforce.

  1. Set up an email relayemail relay, if you haven’t already.
  2. From Setup, in the Quick Find box, enter Email Domain Filters, and then select Email Domain Filters.
  3. Select Create Email Domain Filter.
  4. Configure these settings.
    Setting Description
    Sender Domain

    Restricts the email relay to send emails based on the listed sender domains.  Enter a comma-separated list of sender domains or patterns allowed to use the email relay. This field supports the wildcard character (*). The default is *.

    • example.com - DomainOnly: Sign if sending domain matches at the domain level only (example.com, but not mail.example.com).
    • *.example.com - SubdomainsOnly: Sign if sending domain matches at the subdomain level only (mail.example.com, but not example.com).
    • example.com,*.example.com - DomainAndSubdomains: Sign if sending domain matches at the domain and subdomain levels (example.com and mail.example.com).
    Recipient Domain

    Restricts the email relay to send emails based on the listed recipient domains. Enter a comma-separated list of recipient domains allowed to use the email relay. This field supports the wildcard character (*). The default is *.

    If you specify certain domains, such as *.salesforce.com and *.gmail.com, emails sent to any other domain will not be relayed. To allow emails to all recipients, use the wildcard character (*).

    Email Relay Specifies the relay host for the domain filter.
    Active Enables or disables the domain filter.

    The wildcard character (*) must precede a second-level domain name. For example, *.example.com includes all subdomains of example.com.

  5. Save the page.

If you set up multiple email domain filters, only the first matching filter applies. By default, email domain filters are evaluated in the order that they were created. Use the PriorityNumber field on the EmailDomainFilter object SOAP API to change the evaluation order. If no matching rule for email relay is found, then the email sends via the Salesforce Mail servers.

 
Loading
Salesforce Help | Article