Plesk 7 with External Mail Server
Filed Under (Linux) by cranst on 29-09-2005
To use an external mail server in conjunction with Plesk 7 (I’m using 7.0.3), you need to setup a new A record for that mail name. You do this in the DNS record for the specific domain. The record will point mail.yourdomain.com. to your external mail server’s IP address, then remove the previous A record for mail.yourdomain.com. This means all mail going through mail.yourdomain.com will now be sent to that new IP Address, which should already be setup to listen for mail. Next, go into the Mail section of that domain and and make sure you Disable mail. Normally, this would be the last step, but there is a bug in this and previous versions of Plesk for Linux/UNIX. All will seem to be working with the exception of any mail() functions you may be using in your code. These will all try to send mail locally despite you having turned off mail for that domain. To fix this, remove the domain from these two files:
/var/qmail/control/rcpthosts
/var/qmail/control/virtualdomains
Then restart the qmail service. All mail, even local scripts, will now send mail to the external mail server.
