Add to Favourites Add to Favourites    Print this Article Print this Article

Incorrect header for incoming or outgoing messages when SPF spam protection is switched on

It is Parallels Plesk Panel version 9.0.0 installed and SPF spam protection enabled in server-wide mail preferences {Home -> Mail Server Settings}.

This causes incoming or outgoing messages have incorrect headers like below.

From Tue Dec 2 11:00:58 2008
Received: from (unknown [])
by (Postfix) with ESMTP id 03C44716AC
for ; Tue, 2 Dec 2008
16:00:57 +0000 (UTC)
Message-Id: <>
Date: Tue, 2 Dec 2008 11:00:57 -0500 (EST)
To: undisclosed-recipients:;

+ <- here is wrong record
Received: from (unknown [])
by (Postfix) with SMTP
for ; Tue, 2 Dec 2008
16:00:57 +0000 (UTC)
Received: by (nbSMTP-1.00) for uid 1001; Tue, 2 Dec 2008 15:35:15 +0600 (NOVT)
MIME-Version: 1.0

It doesn't matter which MTA is used: either Qmail or Postfix.

The problem is caused by spf-handler that composes message header incorrectly. It has been fixed in Parallels Plesk Panel since version 9.0.1.

Fixed spf-handler for Parallels Plesk Panel 9.0.0 is in the attachment. To install the fixed handler you should download the archive attached and unpack it with tar -zxf. Select the handler appropriate to your operating system and architecture and replace existent handler with the file.
The handler is /usr/local/psa/handlers/hooks/spf for RedHat family and FreeBSD operating systems and /opt/psa/handlers/hooks/spf for Debian family.

Do not forget to correct ownership and permissions.

~# ls -l /usr/local/psa/handlers/hooks/spf
-r-xr-x--- 1 root popuser 20656 Nov 17 17:46 /usr/local/psa/handlers/hooks/spf

You may correct permissions with commands chown and chmod. For example:

~# chown root:popuser /usr/local/psa/handlers/hooks/spf
~# chmod 550 /usr/local/psa/handlers/hooks/spf

Was this answer helpful?

Also Read