• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Recipient address rejected: User unknown in virtual mailbox table).

hubert

New Pleskian
Dear friends, I have "mydomain.com" one email address on exchange and one email address on VPS. When I want to send an email from email address from VPS to email on exchange i get - Error SMTP (550): can't add the recipient "[email protected]" (5.1.1 <exchange@mydomain>: Recipient address rejected: User unknown in virtual mailbox table).
How can i send emails locally?

h
 
Postfix mail server always tries to deliver an email locally first. As mydomain.com exists on a local server, Postfix looks for a mailbox @mydomain.com locally without checking the domain's external mail service. Postfix does not retry to deliver email to the external server if the recipient mailbox was not found locally: this is Postfix's behaviour by design.

As a possible solution, you can disable mail service for the recipient domain. It has mail served externally anyway, so by disabling mail service on a Plesk server for mydomain.com, Postfix will not check for [email protected] mailbox presence locally and will connect to external mail server directly using global DNS records:

  1. In Plesk, go to Domains > mydomain.com > Mail Settings.

  2. Disable the option Activate mail service on this domain.
 
hmm but if I do like You suggest than I will not achieve my goal which is having one email account on exchange and one on vps (bc vps will be off). Is it possible to omit somehow this that "Postfix mail server always tries to deliver an email locally first" and to send mail from VPS to exchange within one domain?
 
Note: Having the mails of a domain distributed onto 2 different mail systems is never a good idea and will cause problems at some point.

As a workaround, you could configure your PHP scripts to use an external SMTP server to send the mails so that the mail will be delivered according to the MX record of the domain, assuming that the MX of the domain is pointing to your Exchange server. If your MX points to your Plesk VPS then you should configure your PHP scripts to deliver the mail directly to your Exchange server.

But let me emphasize again: 1 domain = 1 mail system. Anything else is just plain ugly.
 
I had the same problem : mailboxes *@mydomain.com hosted externally, but wanted one specific email account hosted locally.

One solution that may help is to disable the mail service on the local domain then activate it on a subdomain (ie: mysubdomain.mydomain.com).

Plesk allows you to do that.

Then simply create the local mailboxes on that subdomain, ie: [email protected]

Worked fine for me.

HTH
Marc
 
Back
Top