How to set up SpamExpert’s incoming spam filter in Plesk

Estimated reading time: 2 min


We are going to explain in this article how you can configure the incoming spam filter of SpamExperts in Plesk.


Step 1: Log in to Plesk

Log in to your Plesk environment via

plesk login

Step 2: Mail Server Settings

On the left pane, click Tools and Settings. View tab Mail and open the mail server settings by clicking to Mail Server Settings.

plesk dashboard mail

Step 3: SPF Spam Protection

Scroll down to the section SPF spam protection. The Plesk default configuration is set to do an SPF check but it will never block the mail regardless of the outcome of the SPF check. Based on your mail server configuration, it can decide to put it in the spam box or not.

In our environment, we are using SpamExperts as incoming spam filters. They advise whitelisting their mail servers, this will prevent Plesk from rejecting deliveries from their mail servers. Enter the following text in the SPF local rules.

Save your changes by clicking OK.

plesk spf spam protection

Step 4: SpamAssassin

If SpamAssassin is not enabled for your server go further to step 5. Use SSH to log in. Open /etc/mail/spamassassin/ and append the following line.


After adding mail servers as trusted, we can restart SpamAssassin. Go back to Plesk. On the left pane of the dashboard, click Tools and Settings . Look at the tab Server Management and open service management by clicking to Services Management.

plesk sm

Restart SpamAssasin by clicking the restart icon.

plesk sa restart

Step 5: Test Email delivery

In this step, it is advised using a domain that is not using SpamExperts for incoming or outgoing emails. Send a test email to a user that is hosted on the Plesk server which you are configuring.

Once the mail is received, open the mail headers.

Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from ( [])
    by (Postfix) with ESMTPS id 8A00A300683
    for <[email protected]>; Tue, 19 May 2020 11:59:19 +0200 (CEST)
    dmarc=none (p=NONE sp=NONE);
    spf=pass (sender IP is [email protected]
Received-SPF: pass ( domain of designates as permitted sender) client-ip=; [email protected];;
Received: from ([])
    by with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
    (Exim 4.92)
    (envelope-from <[email protected]>)
    id 1jaz1c-0007jj-6d
    for [email protected]; Tue, 19 May 2020 11:59:16 +0200
Received: by with SMTP id r3so6184368qve.1
    for <[email protected]>; Tue, 19 May 2020 02:59:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20150623;
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025;
X-Gm-Message-State: <>
X-Google-Smtp-Source: <>
X-Received: by 2002:a0c:9e53:: with SMTP id <>;
    Tue, 19 May 2020 02:59:00 -0700 (PDT)
MIME-Version: 1.0
From: John Doe <[email protected]>
Date: Tue, 19 May 2020 11:58:49 +0200
Message-ID: <>
Subject: SPF Check
To: [email protected]
Content-Type: multipart/alternative; boundary="000000000000299d8005a5fd54a0"
Received-SPF: pass ( domain of designates as permitted sender) client-ip=; [email protected];;
X-SPF-Result: domain of designates as permitted sender
Authentication-Results:; spf=pass smtp.mailfrom=<[email protected]; dkim=pass
X-Spampanel-Class: unsure
X-Spampanel-Evidence: Combined (0.29)
X-Recommended-Action: accept
X-Filter-ID: <>
X-Report-Abuse-To: [email protected]

In the example above, we can find two Received-SPF values. We start from bottom to top. In the first Received-SPF, you can see that the SPF has passed, which means that SpamExperts did an SPF check on the email that he received from [email protected] and that the mail server with IP address is permitted to send emails for [email protected].

Received-SPF: pass ( domain of designates as permitted sender) client-ip=; [email protected];;

Let’s proceed with the second Received-SPF value. This is the SPF check on the destination mail server, so in our case, it is the Plesk server.

Received-SPF: pass ( domain of designates as permitted sender) client-ip=; [email protected];;

If SpamAssassin is enabled on your server, be aware that SpamAssassin also checks the SPF record. The SPF must pass otherwise it can increase the SpamAssassin score for incoming emails. You will find extra SpamAssasins headers in the email headers. In the snippet below you can find the lines where the SPF check passes for SpamAssassin.

X-Spam-Status: No, score=2.4 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,
    RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=no autolearn_force=no version=3.4.0


Congratulations, you now have configured incoming spam filters of SpamExperts on your Plesk server.

Was this article helpful?
Dislike 0
Views: 1725

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *