Enable sending e-mails to same domain on external server even if Mail service is enabled for a domain
As more and more customers move to G Suite and Office 365, there is a need to send authenticated emails from local SMTP to external server that handles same domain.
Lets say example.com has a WordPress installation that sends notifications, order confirmations, form confirmations, ... to avoid spam and meet best practices, I will create local e-mail account email@example.com.
As long as mail is enabled locally, one will get error: Recipient address rejected: User unknown in virtual mailbox table; even if firstname.lastname@example.org is perfectly deliverable on external service such as G Suite.
Please fix this, there is a real need, it is a easy fix for Postfix.
Since early 2023 a third option between "Enabled" and "Not configured" for the "Mail Settings" in a domain was added: "Disabled for incoming mail". This lets you send emails from your domain through sendmail with authentication and also lets you send mails through the PHP mail() function, but it does not deliver these mails locally. This solves the issue where mail domains are located elsewhere while a website generates emails from forms or other application scenarios.
We'll be happy to read your comments if you have additional requirements.
Websavers Inc commented
I'm afraid that's not quite the same thing as what was requested. I see where you're coming from in terms of using a PHP SMTP service to bypass local mail entirely, however there's sometimes the need for a hybrid setup with external services. Many customers want to have a few mail accounts on the same domain with G Suite or Microsoft365 and the remainder hosted within Plesk -- this is currently not possible. Normally this is also handled in DNS via fallback MX records, which we can do, but the mail server itself (ie: Postfix) also needs to obey the MX records and not do internal delivery only.
I, personally, prefer when a single domain has only one mail service because more than one makes deliverability tracking difficult, so I'm not in a huge rush for this, but we do get many customers asking for it.
Paul Hermans commented
Would be nice to have a separate SMTP service for website-scripts to send mail, with DKIM per domain.
More and more domains have external Mail solution like Microsoft365, we need an DKIM enabled SMTP service for the scripts.
Need that service too!!
Besides a routine check for MX would prevent the inception of messages:
Sean Missingham commented
I have a second alias domain configured in o365 for the same primary domain.
So, I put a mailbox on plesk for the address I need, turned on auto-forward to the recipient@aliasdomain which isn't on plesk and it ends up in the correct mailbox.
More steps than should be necessary though. +1 for native support of SMTP send-only use case
in combination with O365 as primary mail service this is a really important feature. Local mailserver must be kept alive to be able to send debug mails etc., but you will never receive them in your e.g. O365 mailbox ...
Need to have!!!!
This would indeed be great to have. Incoming email is handled by Office 365 in our case, so we just need Plesk to send outgoing emails (including a DKIM record as well!). All bounces/incoming emails should be delivered to Office 365 according to the DNS MX settings.
Yang Heng Kee commented
I am running into the same issue. I created a email@example.com email account on Plesk, which refuses to send emails to my G Suite managed email account firstname.lastname@example.org and reports the same “Recipient address rejected: User unknown in virtual mailbox table” error because it is trying to deliver emails locally.
We need a fix to allow us to send all emails externally from a Plesk email account.
Oswaldo Triviño commented
Same problem here, a solution is needed
Igi Vuillemier commented
hello everyone, i am in favor of being able to choose the order of the mail service.
so stsandart is now: internal server (plesk) then external to mx zone entries.
it would be good that you can choose the order yourself.
so e.g. first external server (after entries of the mx zone) and as 2nd internal (plesk) ..
or can you solve that otherwise ????
Thanks for your help.