To start you will need a domain registered by you that you own, or have control over.
- 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). - Set the A record for mail.YOURDOMAIN.TLD to your server’s IP address.
- Set the MX records for YOURDOMAIN.TLD to mail.YOURDOMAIN.TLD
- Use this article to configure server wide mail settings.
https://docs.plesk.com/en-US/onyx/administrator-guide/mail/configuring-serverwide-mail-settings.59430/ - 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 - 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
- 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 - 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-