Plesk

Incoming messages are rejected by SPF while using an anti-spam server: REJECT during call ‘spf’ handler

Symptoms

Cause

Incoming message goes through the anti-spam server. Because of this, the sender's IP changes and now it does not match the sender's domain SPF record.

Resolution

Configure SPF local rules in Tools & Settings > Mail Server Settings > SPF local rules. The exact set of rules will vary depending on a specific configuration:

Note: the examples below use placeholders. Make sure to replace them with actual values from the real environment

Local server

Use either of the following rules:

  • ip4:203.0.113.2
  • a:hostname.example.com

Where 203.0.113.2 is the server's IP address, and hostname.example.com is the server's hostname.

SpamExperts solution

Use the following rule: include:spf.antispamcloud.com

Refer to SpamExperts documentation for additional details: https://documentation.n-able.com/spamexperts/userguide/Content/B_Admin%20Level/outgoing-filtering/setting-up-spf.htm 

Other external filtering server

Contact the service's support team to clarify the exact SPF local rules. Generally, the following rules are used:

  • ip4:<remote filter's IP address>
  • a:<remote filter's hostname>
  • include:<remote filter's hostname>