• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

How to route all email from VPS to foreign server?

M

Mateo1041

Guest
Hello,

We just set up the MX record in Plesk so that all incoming email is routed to another server. This works great for external emails coming in from the outside. But when sending email via PHP on the VPS itself, the emails never arrive.

How can I have the VPS send all email traffic, whether from outside or originating from the server itself to another server for processing?

Do I need to change a sendmail setting somewhere?

Thanks!
- Matt.
 
I think I found the solution to this. I had to remove the domain name from the /var/qmail/rcpthosts and /var/qmail/virtualdomains files.

Now the Plesk VPS no longer thinks it needs to process the emails instead of listening to the MX record which points to a different server.
 
Originally posted by Mateo1041
I think I found the solution to this. I had to remove the domain name from the /var/qmail/rcpthosts and /var/qmail/virtualdomains files.

Now the Plesk VPS no longer thinks it needs to process the emails instead of listening to the MX record which points to a different server.

you could just turn off mail service for each these domains :)
 
Thanks for the reply!

Ok, so use the "Disable" icon under "Mail" in Plesk? That won't affect our PHP scripts sending email from the server will it?
 
yes that wont effect php

Mail service for domain off deleting records in the qmail config and qmail will handle that email address as you need
 
Back
Top