• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Server configuration (mailname, hostname + spf records)

Hello,

I am confused if it is needed / better for preventing emails getting classified as spam to align the mail configuration / hostname of my server. The following headers are extracted from my gmail account and reflect an received email by mydomain.com:

Code:
Delivered-To: [email protected]
Received: by 10.129.53.14 with SMTP id c14csp485301ywa;
        Tue, 16 Jan 2018 01:57:42 -0800 (PST)
X-Google-Smtp-Source: ACJfBos0LJC4g1HEDOijCqZfwkyyZAtfX1YiOvYn9YPokMt793UAiQtofbVQV/pZyAq5LdkvxVE1
X-Received: by 10.28.87.195 with SMTP id l186mr13534085wmb.27.1516096661917;
        Tue, 16 Jan 2018 01:57:41 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1516096661; cv=none;
        d=google.com; s=arc-20160816;
        b=I7Jr+DdGEuxia3kkYFtud3JJjTJ9cd+15RVMUGaBEHJNZUAQW2IAU2ZbJgfetFLsvv
         qA1/g+IT8hS18bI3uL6X960xcVG3CzJB3S3RwBmk/KHh1DOPyIrSxQavygCZn1O+f28U
         GKfZ0pYpUOrjpbY4CCWAGnuCihn1CIbdnegsZz3fDgV2KKDR5UJV5PIu/nguNJnrLaOP
         JgeFVWF43lDgb7pQXRvpsTcyEbvY8jtHT4GXTUtkh56hQ9PMq3XN1IW8Zx4hJ4skhyVn
         h+m5gEuRV0Q5xFZXd2A2jzH48jlsXnvTHMwkWWLTAQ2S61JlUuV+qiKmp2uYk+FYFyiQ
         Ll5g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=message-id:content-transfer-encoding:mime-version:subject:to:from
         :date:dkim-signature:arc-authentication-results;
        bh=fAEMzcAqJu9zklHtV23o6igewkTOO5KVl+QXvq1lW14=;
        b=qc7/GN5jopgVcPx69hnk5AfCdjIQWfmGn/TfRDJuoI8vW4WzHq22bRJu6fdnv17P/j
         XxQTaKNC9oxPBZhqqWfn9JmhSUdQonf7YDKW7FHvyrTfJgIfUhsUQOimhmHDFVvFXP0H
         gTpxA0lpy7THF2NPK4S4MzlEzrJAA91PFOExHizF+xDqJN0Es0bsTaNzP65rM0/uo/Fl
         H+A/G+HG2wmCQBcmhs1bRsAvw9Ba7PfZbdKvw5wm6F7N/WscjVA0XhvWogJUxb5N9fIZ
         w9jGXpLIzqXi4c6ASfDGz2Ph62Vz7zvvU74PSrOssfnkFCPt//v7WjHS4ajcHdYpTi2i
         fZVA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass [email protected] header.s=default header.b=rbtptC5b;
       spf=pass (google.com: domain of [email protected] designates 12.34.56.78 as permitted sender) [email protected];
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mydomain.com
Return-Path: <[email protected]>
Received: from mail.mydomain.com (mail.mydomain.com. [12.34.56.78])
        by mx.google.com with ESMTPS id j69si1615425wmi.2.2018.01.16.01.57.41
        for <[email protected]>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 16 Jan 2018 01:57:41 -0800 (PST)
Received-SPF: pass (google.com: domain of [email protected] designates 12.34.56.78 as permitted sender) client-ip=12.34.56.78;
Authentication-Results: mx.google.com;
       dkim=pass [email protected] header.s=default header.b=rbtptC5b;
       spf=pass (google.com: domain of [email protected] designates 12.34.56.78 as permitted sender) [email protected];
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mydomain.com
Received: from mydomain.com (mydomain.com [IPv6:2a01:4f8:10b:1f55::2]) by mail.mydomain.com (Postfix) with ESMTPSA id 45C663C0940 for <[email protected]>; Tue, 16 Jan 2018 10:57:41 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mydomain.com; s=default; t=1516096661; bh=fAEMzcAqJu9zklHtV23o6igewkTOO5KVl+QXvq1lW14=; l=12344; h=From:To:Subject; b=rbtptC5bdBGWr6g6LIIlkZlXKgeS51IO8qlta8yFeRgLwsSsat5zSaO29/xl5lDSR
    DaKM3MavmkcxoNX+OrEHJi1RbuyNWCfuzg37zztBAih2TWc8B0B2qseyJSK2Jm43dY
    8DHaMU4zl1d/PTbueNXxegSXKzkpqYV6Aw5EdS5E=
Authentication-Results: plesksub.mydomain.com;
        spf=pass (sender IP is 2a01:4f8:10b:1f55::2) [email protected] smtp.helo=mydomain.com
Received-SPF: pass (plesksub.mydomain.com: connection is authenticated)
Date: Tue, 16 Jan 2018 10:57:41 +0100
From: MyCompany <[email protected]>
To: [email protected]
Subject: Your support inquiry at mydomain.com
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Message-Id: <[email protected]>

As you can see, I have three different domains involved in sending here: mydomain.com, mail.mydomain.com and plesksub.mydomain.com.

The hostname of the server is: plesksub.mydomain.com. Plesk panel is also at plesksub.mydomain.com:8443.

Would it be better in terms of prevent emails going to spam to change the mail server settings in a way, that the only domain using for handling mails is mydomain.com (f.e. replace plesksub.mydomain.com and mail.mydomain.com with mydomain.com)?

If it does not make sense to align the configuration and I should rather use it as it is:
I am also not sure how to configure spf records. Do I need to configure them for mydomain.com, plesksub.mydomain.com or mail.mydomain.com?

My current spf records:
Code:
mydomain.com TXT "v=spf1 mx include:mail.mydomain.com ip4:12.34.56.78 -all"
mail.mydomain.com TXT "v=spf1 ip4:12.34.56.78 ~all"
plesksub.mydomain.com TXT ??? (IS CONFIGURATION NEEDED?)

I am using an external DNS / nameserver.

Thanks for your help.
 
Hello,

I am confused if it is needed / better for preventing emails getting classified as spam to align the mail configuration / hostname of my server. The following headers are extracted from my gmail account and reflect an received email by mydomain.com:

Code:
Delivered-To: [email protected]
Received: by 10.129.53.14 with SMTP id c14csp485301ywa;
        Tue, 16 Jan 2018 01:57:42 -0800 (PST)
X-Google-Smtp-Source: ACJfBos0LJC4g1HEDOijCqZfwkyyZAtfX1YiOvYn9YPokMt793UAiQtofbVQV/pZyAq5LdkvxVE1
X-Received: by 10.28.87.195 with SMTP id l186mr13534085wmb.27.1516096661917;
        Tue, 16 Jan 2018 01:57:41 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1516096661; cv=none;
        d=google.com; s=arc-20160816;
        b=I7Jr+DdGEuxia3kkYFtud3JJjTJ9cd+15RVMUGaBEHJNZUAQW2IAU2ZbJgfetFLsvv
         qA1/g+IT8hS18bI3uL6X960xcVG3CzJB3S3RwBmk/KHh1DOPyIrSxQavygCZn1O+f28U
         GKfZ0pYpUOrjpbY4CCWAGnuCihn1CIbdnegsZz3fDgV2KKDR5UJV5PIu/nguNJnrLaOP
         JgeFVWF43lDgb7pQXRvpsTcyEbvY8jtHT4GXTUtkh56hQ9PMq3XN1IW8Zx4hJ4skhyVn
         h+m5gEuRV0Q5xFZXd2A2jzH48jlsXnvTHMwkWWLTAQ2S61JlUuV+qiKmp2uYk+FYFyiQ
         Ll5g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=message-id:content-transfer-encoding:mime-version:subject:to:from
         :date:dkim-signature:arc-authentication-results;
        bh=fAEMzcAqJu9zklHtV23o6igewkTOO5KVl+QXvq1lW14=;
        b=qc7/GN5jopgVcPx69hnk5AfCdjIQWfmGn/TfRDJuoI8vW4WzHq22bRJu6fdnv17P/j
         XxQTaKNC9oxPBZhqqWfn9JmhSUdQonf7YDKW7FHvyrTfJgIfUhsUQOimhmHDFVvFXP0H
         gTpxA0lpy7THF2NPK4S4MzlEzrJAA91PFOExHizF+xDqJN0Es0bsTaNzP65rM0/uo/Fl
         H+A/G+HG2wmCQBcmhs1bRsAvw9Ba7PfZbdKvw5wm6F7N/WscjVA0XhvWogJUxb5N9fIZ
         w9jGXpLIzqXi4c6ASfDGz2Ph62Vz7zvvU74PSrOssfnkFCPt//v7WjHS4ajcHdYpTi2i
         fZVA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass [email protected] header.s=default header.b=rbtptC5b;
       spf=pass (google.com: domain of [email protected] designates 12.34.56.78 as permitted sender) [email protected];
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mydomain.com
Return-Path: <[email protected]>
Received: from mail.mydomain.com (mail.mydomain.com. [12.34.56.78])
        by mx.google.com with ESMTPS id j69si1615425wmi.2.2018.01.16.01.57.41
        for <[email protected]>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 16 Jan 2018 01:57:41 -0800 (PST)
Received-SPF: pass (google.com: domain of [email protected] designates 12.34.56.78 as permitted sender) client-ip=12.34.56.78;
Authentication-Results: mx.google.com;
       dkim=pass [email protected] header.s=default header.b=rbtptC5b;
       spf=pass (google.com: domain of [email protected] designates 12.34.56.78 as permitted sender) [email protected];
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mydomain.com
Received: from mydomain.com (mydomain.com [IPv6:2a01:4f8:10b:1f55::2]) by mail.mydomain.com (Postfix) with ESMTPSA id 45C663C0940 for <[email protected]>; Tue, 16 Jan 2018 10:57:41 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mydomain.com; s=default; t=1516096661; bh=fAEMzcAqJu9zklHtV23o6igewkTOO5KVl+QXvq1lW14=; l=12344; h=From:To:Subject; b=rbtptC5bdBGWr6g6LIIlkZlXKgeS51IO8qlta8yFeRgLwsSsat5zSaO29/xl5lDSR
    DaKM3MavmkcxoNX+OrEHJi1RbuyNWCfuzg37zztBAih2TWc8B0B2qseyJSK2Jm43dY
    8DHaMU4zl1d/PTbueNXxegSXKzkpqYV6Aw5EdS5E=
Authentication-Results: plesksub.mydomain.com;
        spf=pass (sender IP is 2a01:4f8:10b:1f55::2) [email protected] smtp.helo=mydomain.com
Received-SPF: pass (plesksub.mydomain.com: connection is authenticated)
Date: Tue, 16 Jan 2018 10:57:41 +0100
From: MyCompany <[email protected]>
To: [email protected]
Subject: Your support inquiry at mydomain.com
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Message-Id: <[email protected]>

As you can see, I have three different domains involved in sending here: mydomain.com, mail.mydomain.com and plesksub.mydomain.com.

The hostname of the server is: plesksub.mydomain.com. Plesk panel is also at plesksub.mydomain.com:8443.

Would it be better in terms of prevent emails going to spam to change the mail server settings in a way, that the only domain using for handling mails is mydomain.com (f.e. replace plesksub.mydomain.com and mail.mydomain.com with mydomain.com)?

If it does not make sense to align the configuration and I should rather use it as it is:
I am also not sure how to configure spf records. Do I need to configure them for mydomain.com, plesksub.mydomain.com or mail.mydomain.com?

My current spf records:
Code:
mydomain.com TXT "v=spf1 mx include:mail.mydomain.com ip4:12.34.56.78 -all"
mail.mydomain.com TXT "v=spf1 ip4:12.34.56.78 ~all"
plesksub.mydomain.com TXT ??? (IS CONFIGURATION NEEDED?)

I am using an external DNS / nameserver.

Thanks for your help.

Hello ,
if your server hostname is plesksub.mydomain.com, your SPF should look like :
Code:
mydomain.com   TXT   "v=spf1 +a +mx +a:plesksub.mydomain.com -all"

Also make sure to set plesksub.mydomain.com as rDNS on your server IP.
 
Thank you for your reply. I was wondering if it is possible to change the hostname (with no negative side effects on PLESK) to "mydomain.com". So I do not expose my Plesk panel's domain "plesksub.mydomain.com" in my sent emails...
I found how to do that in the manual: How to change or get a server hostname on Plesk server

If I change the hostname, will the PLESK panel be still accessible via "plesksub.mydomain.com"?

I am still confused why the spf you posted will work: Currently I set the reverse dns to "mail.mydomain.com" and configured the spf entries like I wrote in my first post and they are already valid (verified using mxtoolbox.com). Why exactly do I need to set "+a: plesksub.mydomain.com"?
 
Last edited:
No, a server hostname should always be a FQDN (fully qualified domain) than mean : whatyouwant.yourdomain.tld

You can use a different address to access to Plesk and for your mail server, just choose the SSL certificate you want to use in Plesk SSL/TLS settings.

About SPF, include directive require for a domain to have a valid SPF or it will fail.
Or you should not have to set a SPF for mail.yourdomain.com, only for domain.com.

That's why the easiest is to set your server hostname with the "a" directive to allow the server IP.
But "mx " directive usage is also correct if all your domain MX point to the server IP.

Everything about SPF is listed here : SPF: SPF Record Syntax
 
Back
Top