Configuring custom mail server in Plesk with Linux. (The basics) Cloud VPS & Full Cloud & BMC.

To start you will need a domain registered by you that you own, or have control over.

  1. The first thing you will do is create a subdomain… Typically, mail.YOURDOMAIN.TLD.
    (Note: YOURDOMAIN.TLD is an example, and should be replaced with your domain name).
  2. Set the A record for mail.YOURDOMAIN.TLD to your server’s IP address.
  3. Set the MX records for YOURDOMAIN.TLD to mail.YOURDOMAIN.TLD
  4. Use this article to configure server wide mail settings.
    https://docs.plesk.com/en-US/onyx/administrator-guide/mail/configuring-serverwide-mail-settings.59430/
  5. Use your cloud panel firewall to allow your mail ports (Ports listed below).
    Mail ports:
    Port 110 – this is the default POP3 non-encrypted port
    Port 995 – this is the port you need to use if you want to connect using POP3 securely
    Port 143 – this is the default IMAP non-encrypted port
    Port 993 – this is the port you need to use if you want to connect using IMAP securely
    Port 25 – this is the default SMTP non-encrypted port
    Port 465 – this is the port used if you want to send messages using SMTP securely
  6. Reverse DNS – is set in the cloud panel > network > public IP > Select the IP and scroll down. You will see a pencil icon next to the IP. Click it, and put in your valid domain name. Set it to mail.YOURDOMAIN.TLD
  7. Set your Hostname in plesk to mail.YOURDOMAIN.TLD
    https://support.plesk.com/hc/en-us/articles/213941265-How-to-change-or-get-a-server-hostname-on-Plesk-server
  8. Create your first email account in plesk for testing.
    https://docs.plesk.com/en-US/obsidian/customer-guide/quick-start-with-plesk/set-up-mail-accounts/1-create-mail-account.69277/

Additional information for configure SPF and DKIM, which is needed:

Mail logs – Over SSH… review your mail logs in /var/log/maillog for any mail errors sending, etc, if you are having issues.

DKIM – https://docs.plesk.com/en-US/onyx/customer-guide/mail-settings/enabling-dkim-email-signing.74718/

How-to-get-the-DKIM-public-key-from-Plesk-if-DNS-is-not-installed
https://support.plesk.com/hc/en-us/articles/115000214973-How-to-get-the-DKIM-public-key-from-Plesk-if-DNS-is-not-installed-

DKIM Validator… https://dkimvalidator.com/

SPF – https://support.plesk.com/hc/en-us/articles/213937025-What-is-the-SPF-How-to-configure-and-use-SPF-on-Plesk-server-

CREATING / Modifying SPF RECORDS: https://www.spfwizard.net/

Emails sent from a Plesk server to mail services like Gmail, Outlook or Yahoo! Mail appear in spam. How to troubleshoot?
https://support.plesk.com/hc/en-us/articles/115003843813-Outgoing-emails-sent-from-Plesk-server-to-mail-services-like-GMail-Yahoo-Hotmail-goes-to-spam-folder-How-to-troubleshoot-

Mohammed has written 63 articles

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>