• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved PHP and Plesk sending mails

Denis Gomes Franco

Regular Pleskian
Hi,
I'm setting up my Plesk server and some domains that I'm hosting are using external mailbox services. When Plesk (or a PHP script such as a Wordpress site from another domain) tries to send an email to one of these domains, that message is routed locally and thus never reaches inbox. I understand this is the default behavior, eg, if the mailbox is locally hosted, why should the message go out on the internet ;)

So, is there any way to make Plesk (or Postfix?) always query MX records instead of just delivering mail locally? I remember years ago seeing something like that on Cpanel that would fix this specific problem.
 
Solution: Disable the mail service for the domain (Login => Domains => "Mail settings" => uncheck "Activate mail service on this domain"). Once you've done that, Plesk will not consider the domain as a local domain and will use DNS to route the mail to the MX servers.
 
I just had the same issue, this does not work. Even if you disable the mailservice, subsciption by subsciption or in general setting, this does not work, plesk will try to use virtual_relay anyway.

You have to disable the plesk virtual relay in main.cf if you use postfix :

here are the lines I commented :

I replalced :
#mydestination = localhost.ovh, localhost, localhost.localdomain
by
mydestination =

but this did not work. then, I commented :

#virtual_transport = plesk_virtual

but this did not work either, and finally, I commented :

#virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
#virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
#virtual_mailbox_maps = , hash:/var/spool/postfix/plesk/vmailbox

and now, mails are sent only toward external relays.

maybe commenting only the 3 latest lines will work. Hope this will be fixed by plesk because this is a very old issue !
 
I just tried with the 3 lines comented, and it works :
#virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
#virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
#virtual_mailbox_maps = , hash:/var/spool/postfix/plesk/vmailbox

plesk will not try to user it own relay. Mails are going out to external relays
 
lucky you, it did not work for me on 2 plesks, one with subsription, and other with only domain managment :( Maybe I should try to re activate mail service in main setings, and desactivate one by one the mail option for each domain / subscription, but this is quite painful :(
 
Back
Top