• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved We can not rename a domain... already install few years ago

Erwan

Regular Pleskian
Hi,

We can not rename a domain that we have already install in the same server a few years ago.

Domain: tmp.mydomain.com
We want to rename to: mydomain.com

Erreur: mailmng-core failed: Fatal error: boost::filesystem::filesystem_error(boost::filesystem::rename: Directory not empty: "/var/qmail/mailnames/tmp.mydomain.com", "/var/qmail/mailnames/mydomain.com")

There is old install of "mydomain.com" in /var/qmail/mailnames/....

How can resolve it?

If i move "/var/qmail/mailnames/mydomain.com" before the operation, there is also a DB error...

Thank you.
 
Does the webserver configuration trouble shooter find additional, unnecessary configurations in the database?
 
No, this is not about Plesk repair. It is the webserver configurations trouble shooter extension. In a Plesk default installation you can find it in "extensions".

I am asking, because it seems that the domain is known in the database while it is not displayed in the GUI. This means that there can be orphaned records referring to the domain name that need to be removed in order to be able to create the domain. The problem is that when you remove the mailbox while something still expects the domain to be there (the mailbox), you might see the database error you have mentioned. What exactly is that database error, anyway?

If you wish to skip the test, you can try to
1) Create the domain (not renaming an existing, but creating a new one with that name)
2) Delete the domain again
3) Try to rename the subdomain.
 
When i want to create domain:
> Erreur: mailmng-outgoing failed: ERROR:eek:utgoing:column name is not unique

But i can see the domain in the list but without hebergement.
When i delete it and remane the subdomain:

> Erreur: mailmng-outgoing failed: ERROR:eek:utgoing:No backend DB entries were modified.
 
It's not an easy to solve issue, because it can have several reasons.

Please remove the domain again through the GUI.

Then on Linux run
# /usr/local/psa/admin/sbin/mailmng-outgoing --remove-subscription --main-domain-name=example.com
(Instead of example.com use the domain name.) This will remove the domain name from the outgoing mail control table.

Then create the domain again in the panel (not renaming an existing, just creating as a new domain). The error should not occur. If it occurs, maybe this can help:
Domain or mail account creation error: mailmng-outgoing failed

Then remove the domain again (delete) it through the panel.

Then try the renaming procedure again. Do not try to rename the existing domain until you have verified that the domain name you want to rename it to can be created separately and removed separately without errors. I remember a case that we had where otherwise you might loose the mailbox content of the existing domain that you are trying to rename.
 
I forgot to mention to also run
# plesk repair mail -y
to make sure that the mailboxes are o.k.
 
So...

Please remove the domain again through the GUI.
==> ok

Then on Linux run
# /usr/local/psa/admin/sbin/mailmng-outgoing --remove-subscription --main-domain-name=example.com
(Instead of example.com use the domain name.) This will remove the domain name from the outgoing mail control table.

==> # /usr/local/psa/admin/sbin/mailmng-outgoing --remove-subscription --main-domain-name=mydomain.com
WARNING:eek:utgoing:No backend DB entries were modified.

Then create the domain again in the panel (not renaming an existing, just creating as a new domain). The error should not occur. If it occurs, maybe this can help:
Domain or mail account creation error: mailmng-outgoing failed

==> Erreur: mailmng-outgoing failed: ERROR:eek:utgoing:column name is not unique

I've made:
# plesk repair mail -y
Repairing the mail server configuration
Reconfiguring all domains and mailboxes .........................
Error messages: 0; Warnings: 0; Errors resolved: 0

I've made:
#plesk repair mail mydomain.com

Repairing the mail server configuration
Reconfiguring the settings of domains: mydomain.com .... [2019-03-14 08:43:06.680] ERR [panel] Call to a member function getStatus() on null:
0: /usr/local/psa/admin/plib/Repair/Mail.php:117
Repair_Mail->_reconfigureDomainsUnix(array)
1: /usr/local/psa/admin/plib/Repair/Mail.php:68
Repair_Mail->reconfigureDomains(array)
2: /usr/local/psa/admin/plib/Repair/Aspect/Mail.php:45
Repair_Aspect_Mail->{closure}()
3: /usr/local/psa/admin/plib/Repair/Aspect/Abstract.php:52
Repair_Aspect_Abstract->_checkAspect(object of type Closure)
4: /usr/local/psa/admin/plib/Repair/Aspect/Mail.php:46
Repair_Aspect_Mail->_checkAndFix()
5: /usr/local/psa/admin/plib/Repair/Aspect/Abstract.php:37
Repair_Aspect_Abstract->checkAndFix()
6: /usr/local/psa/admin/plib/api-common/cuRepair.php:182
cuRepair->execute()
7: /usr/local/psa/admin/plib/api-common/CuExecutor.php:67
CuExecutor->execUtil(string 'cuRepair', string 'execute')
8: /usr/local/psa/admin/plib/api-common/CuExecutor.php:130
CuExecutor->run()
9: /usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php:25
CliUtilityRunner->run()
10: /usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php:36
require_once(string '/usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php')
11: /usr/local/psa/admin/plib/api-cli/repair.php:4
ERROR: Error: Call to a member function getStatus() on null (Mail.php:117)
exit status 1
 
After all, i've have create domain successfull in the same subscription (doesn't work anyway with a new subscription).
I've move the data from tmp.subdomain.com to subdomain.com.

It's ok now. Thank you Peter.
 
Back
Top