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

Symptoms:
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 mail@domain.com Tue Dec 2 11:00:58 2008
Return-Path:
X-Original-To: mail01@test.autogen-10-52-31-28.qa.plesk.ru
Delivered-To: mail01@test.autogen-10-52-31-28.qa.plesk.ru
Received: from autogen-10-52-31-28.qa.plesk.ru (unknown [127.0.0.1])
by autogen-10-52-31-28.qa.plesk.ru (Postfix) with ESMTP id 03C44716AC
for ; Tue, 2 Dec 2008
16:00:57 +0000 (UTC)
Message-Id: <20081202160058.03C44716AC@autogen-10-52-31-28.qa.plesk.ru>
Date: Tue, 2 Dec 2008 11:00:57 -0500 (EST)
From: mail@domain.com
To: undisclosed-recipients:;

+ <- here is wrong record
Received: from openvzx64.qa.plesk.ru (unknown [192.168.61.44])
by autogen-10-52-31-28.qa.plesk.ru (Postfix) with SMTP
for ; Tue, 2 Dec 2008
16:00:57 +0000 (UTC)
Received: by openvzx64.qa.plesk.ru (nbSMTP-1.00) for uid 1001
mail@domain.com; 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.

Resolution:
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