> Source: [sk180839](https://support.checkpoint.com/results/sk/sk180839)

# sk180839 - How to configure whitelist domains and IPs to skip SPF validation on on-premises MTA

| Property | Value |
|----------|-------|
| Solution ID | sk180839 |
| Date Created | 2023-04-10 |
| Last Modified | 2023-04-10 |
| Technical Level | General |
| Products | Security Gateway |
| Versions | R82.10, R82, R81.20 |

## Solution

### Procedure

1. Connect to the command line on the Security Gateway or on each cluster member.  

2. Log in to the Expert mode.  

3. Edit the *$FWDIR/conf/mail_security_config* file
   1. Back up the current *$FWDIR/conf/mail_security_config* file:  
      `cp -v $FWDIR/conf/mail_security_config{,_BKP}`
   2. Edit the current *$FWDIR/conf/mail_security_config* file:  
      `vi $FWDIR/conf/mail_security_config`
   3. In the \[spf\] section, add this line (make sure this parameter appears only one time in the file):  
      `whitelist_enabled=1`
   4. Save the changes in the file and exit Vi editor.  

4. (Optional) To exclude domains from the SPF validation:
   1. Create the *$FWDIR/conf/spf_domain_exclude_list* file  
      `vi $FWDIR/conf/spf_domain_exclude_list`
   2. Add the sender domains - one domain on each line.
   3. Save the changes in the file and exit Vi editor.  

5. (Optional) To exclude IP addresses from the SPF validation:
   1. Create the *$FWDIR/conf/spf_ip_exclude_list* file:  
      `touch $FWDIR/conf/spf_ip_exclude_list`
   2. Add the sender IP addresses - one IP address on each line.
   3. Save the changes in the file and exit Vi editor.  

6. In SmartConsole, install the Access Control Policy and the Threat Prevention Policy on this Security Gateway or Cluster.

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
