I get the bounce message which states that the mail cannot be delivered to the destination address because of MX or A records for the domain point to local Plesk server but there is no such domain in Qmail control files.
You get bounce message like below or similar errors present in maillog:
: Sorry. Although I'm listed as a best-preference MX or A for that host, it isn't in my control/locals file, so I don't treat it as local. (#5.4.6)
When domain is created in Plesk, the domain name is added to ...qmail/control/rcpthosts and ...qmail/control/virtualdomains files to specify that domain is local (virtualdomains file) and messages to it should be accepted w/o authorization (rcpthosts file).
So when you see the error "I'm listed as a best-preference MX or A for that host, it isn't in my control/locals file", it may happen because of several reasons:
- domain really does not exist in Plesk, but domain's DNS points to your server as domain's MX,
- domain exists but domain.com > Mail > Disable option was chosen in the Plesk interface,
- domain exists and domain was added to above files but qmail failed to restart after it (qmail reads these files during start only),
- domain exists but domain was not added to the above files because of some failure during domain creation or the files were modified manually.
If the domain really exists in Plesk and Mail service is enabled for it, you can rebuild Qmail configuration files using /usr/local/psa/admin/sbin/mchk utility.
The most often such "listed as a best-preference MX" error happens with system messages sent to addresses like root@hostname or postmaster@hostname. Usually people do not add `hostname` domain into Plesk and qmail does not know where to deliver various system reports and such messages stall in queue while they are dropped. The simplest way in such situation in to create 'hostname' domain in Plesk w/o any hosting and create there root@ mailaccount with aliases postmaster@, anonymous@, DrWEB-DAEMON@ and so on and redirect it to some real mailbox. Or it is even simpler not to enable either mailbox or forward option for this account - in this case all the messages to the account will be accepted but dropped immediately.