We have many resources in our documentation for setting up and configuring a dedicated Mail server to link to your cPanel server. Please use this resource as a jumping-off point to guide you through the installation and configuration of your new system.
After you are done with the installation, you will need to set your server to the Mail server profile.
Navigate to "WHM / Server Configuration / Server Profile" and select the "Mail" profile, then follow the wizard to complete the change. For more information, we have additional documentation.
Once complete, the Node must be linked to your WHM server from your main server's "WHM / Server Configuration / Link Server Nodes" page.