What do notifications from "SPF filter" mean?

Created:

2016-11-16 12:43:32 UTC

Modified:

2017-04-24 11:30:31 UTC

1

Was this article helpful?


Have more questions?

Submit a request

What do notifications from "SPF filter" mean?

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux
  • Plesk 12.0 for Linux

Question

SPF spam filter is enabled in server-wide mail preferences in Tools and Settings > Mail Server Settings > Switch on SPF spam protection .

The following notifications are shown in /usr/local/psa/var/log/maillog :

plesk spf filter[22147]: Starting spf filter...
plesk spf filter[22147]: remote IP address does not correct
plesk spf filter[22147]: Unable to get options for spf filter

or

plesk spf filter[22090]: Starting spf filter...
plesk spf filter[22090]: Error code: (2) Could not find a valid SPF record
plesk spf filter[22090]: Failed to query guess rules: Could not find a valid SPF record near 'a/24 mx/24 p'
plesk spf filter[22090]: Failed to query MAIL-FROM: No DNS data for 'domain.tld'.

What do they mean?

Answer

Unable to get options for spf filter:

The notification "Unable to get options for spf filter" is an error that is caused by an incorrect header of the sent message. It may occur if the SMTP command HELO/EHLO is missing. The message is not checked by SPF.

If you see the error when sending email via telnet , verify that the message is formatted correctly.

For example:

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 plesk90.plesk.tld ESMTP
HELO plesk90.plesk.tld
250 plesk90.plesk.tld
MAIL FROM: root@plesk90.plesk.tld
250 ok
RCPT TO: yourmail@domain.tld
250 ok
data
354 go ahead
Subject: Test message for SPF spam protection
From: root@plesk90.plesk.tld_

Could not find a valid SPF record near 'a/24 mx/24 p':

The notification "Could not find a valid SPF record near 'a/24 mx/24 p'" appears if an incorrect guess rule is configured in SPF. Verify that the rule starts with "v=spf1."

You may reconfigure the rule in Tools and Settings > Mail Server Settings > Switch on SPF spam protection > SPF guess rules or manually in the file /etc/psa/spf/spfguess .

For example:

# cat /etc/psa/spf/spfguess
v=spf1 a/24 mx/24 ptr
#

Error code: (2) Could not find a valid SPF record

Failed to query MAIL-FROM: No DNS data for 'domain.tld':

The notifications "Error code: (2) Could not find a valid SPF record" and "Failed to query MAIL-FROM: No DNS data for 'domain.tld'" occur if the domain domain.tld does not have a valid SPF record in the DNS. In this case, SPF local rules are not applied.

The message is processed according to SPF checking mode set in server-wide mail preferences Tools and Settings > Mail Server Settings > Switch on SPF spam protection > SPF checking mode .

To resolve the problem, you should configure SPF records in the DNS zone of the domain that sends mail ( MAIL FROM ).

Additional information

For more details about records types and spf, visit:

http://www.openspf.org/SPF_Record_Syntax

Have more questions? Submit a request
Please sign in to leave a comment.