The Plesk control panel allows hosting of both mail and web services on the same server, but often customers need to host mail either on a separate server or through a third party provider. When choosing to host mail on a separate server, there are a few changes that will need to be made within your hosting settings within Plesk. This article will show you how to modify your DNS records and disable local mail service so that mail may be hosted elsewhere.
Editing DNS records within Plesk Panel
Accessing DNS settings
- Log into Plesk
- From the home screen click on Domains under the Hosted Services section
- Choose the domain you wish to manage, and click on its name in the list of domains
- Now on the domains properties page, click on DNS Settings to open the list of domain zone records
Removing the old mail records
Technically, you have the choice to either update the old DNS records, or to remove them completely and then add new ones. Either process involved almost the same amount of steps and we find that removing and adding new records tends to be slightly less confusing, and allows you to actually see to total summary of actions, which is usually appreciated.
- Check the checkboxes next to the existing MX and SPF records that need deleting
Note: You may also want to remove the A records for the mail and webmail subdomains, but that is completely optional unless your new mail provider specifies new records for them. Since this is optional, we are not including them in this example. - With the MX and SPF record selected, click on the Remove button above the list of records
- You will be prompted to confirm removal of the selected records; click on the Yes button to confirm
- The records you selected for removal will now be struck through and have an attention icon next to them showing the pending changes
Please note that as indicated at the top of the screen, these changes are not actually saved at this time; we will do that at the end after adding the new records.
Adding the new DNS records
Now you are ready to add the new MX and SPF records for the new mail service provider. For the purposes of this example, we will use demo.cozaq-2.com as the mail server for our third party mail service provider. You will of course use the SPF and MX records provided to you by your provider.
Adding MX Record(s)
- Click on the Add Record button above the record list
- First let’s add the MX record. Click on the Record type selection menu and click on MX
- If adding this MX record for your primary domain, and not a subdomain, leave the Mail domain box empty. If you were adding an MX record for a subdomain, you would enter the subdomain prefix into this box
- Enter the MX record value you were provided (the name of the mail server) into the Mail exchange server box. Again, for demonstration purposes, we’re using demo.cozaq-2.com as if it were a third party provider’s server
- For the box labeled Specify the priority of the mail exchange server, the actual numbers selected aren’t that critical. What is important is that if you will be adding more than one MX record, then the order of the records should match the priority order provided by your service provider. So for example, if they advise you to set one record with priority of 0 and another record of priority 1, you could use priorities 0 and 5, 5 and 10, or 0 and 20, and it would all have the same effect. Simply maintain the order of priority provided.
- When you’re done entering this record, hit the OK button to continue.
Note: If you need to add additional MX records, repeat steps 1 through 6 until all records have been added
Adding a SPF record
- With your MX record(s) added, it’s time to add an SPF record (assuming one is provided). Click on the Add Record button above the record list once again, but this time choose TXT as the Record type
- Once again, you would leave the Domain name box empty unless you were adding records for a subdomain
- Now enter your domain’s new SPF record into the TXT record box.
SPF records can contain multiple types of flags, allowing mail to be sent from specific IP addresses, domains, from the server specified in the MX record, etc. If you need assistance with determining the proper SPF record to enter, please contact the Cozaq support team by clicking the Submit a Request link here, or at the top of this page.
For our example, we will specify the following flags and options: - +mx - allow mail from the server specified as the MX record
- +a 123.123.123.123 - allow mail from the web server at that IP address; for form submission or similar
- include:servers.mcsv.net - allow mail to be sent from mailchimp, ie: for newsletters
- -all - specify that any mail received from anywhere else pretending to be from demo.cozaq.com should be dropped or rejected
Note: specifying ~all with a tilde instead of a hyphen would indicate a soft-fail instead of a hard-fail; use this when testing to prevent accidental loss of incoming mail due to a typo.
The resulting SPF record would then look like this
v=spf1 +a +mx +a:123.123.123.123 include:servers.mcsv.net -all
- Click on the OK button when you’re ready to add your record
Saving your changes
After adding both MX and SPF records, your record list should look something like the following, with records being kept, record to be deleted, and records to add all displayed slightly differently to allow for visible distinction:
When you are ready to save your changes, click on the blue Update button at the top of the page.
Disable mail service for this domain
Now that mail senders will know where mail should be sent, it’s time to tell this server to stop accepting mail on behalf of your domain. To do this:
- Return to your domain’s properties page and click on the Mail Settings button
- Uncheck the checkbox labeled Activate mail service on this domain to disable mail services on your web/DNS server for this domain
- Click on the OK button to save this change.
That’s it! Your mail services for this domain are now pointed to your new mail service provider in Plesk.
If you have any questions about this process, or about Cozaq's services in general, please reach out to us by clicking the Submit a Request here, or at the top of the page. And don't forget that DNS changes can take several hours (up to 48 in some cases) to be updated in all DNS caches worldwide. Your DNS records will be available immediately, but most servers cache records for domains they've already looked up recently, so be patient and reach out to us if you've got questions - we'll be happy to help!