• 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

Migrating domains with upper case in name.

AlisonP

New Pleskian
I have submitted this to bug reports a few days ago but no answer as yet.
When migrating domains with mixed upper and lower case names we have problems migrating the emails for that domain.

The migration manager logs show things such as the following:
Execution of /usr/local/psa/admin/plib/api-cli/mail.php --create [email protected] -passwd '' -mailbox true failed with return code 4.
Stderr is
Object not found: Domain DomainName.co.uk

When I run these commands on the command line (via SSH) myself they work IF I change all the upper case chars in the string to be lowercase:

/usr/local/psa/admin/plib/api-cli/mail.php --create [email protected] -passwd '' -mailbox true
...for example.

The other commands causing this error are:

/usr/local/psa/admin/plib/api-cli/domain_pref.php
/usr/local/psa/admin/plib/api-cli/maillist.php

As I cannot edit the PHP environment myself I am unsure if there is a fix to this that does not involve parallels changing some code. For now the only option seems to be more us to migrate as much as possible and then add the emails ourselves..
 
Seems problem is that source server has two domains with same GUID. For example:

mysql> select name, guid from domains where guid='8696784e-11ad-4405-b7a9-f4cc1e1ded77';
+------------------+--------------------------------------+
| name | guid |
+------------------+--------------------------------------+
| domain1.co.uk | 8696784e-11ad-4405-b7a9-f4cc1e1ded77 |
| domain2.co.uk | 8696784e-11ad-4405-b7a9-f4cc1e1ded77 |
+------------------+--------------------------------------+
2 rows in set (0.00 sec)

Domain 'domain2.co.uk' was already migrated and when domain 'domain1.co.uk' is attempted to migrate, Parallels Plesk Migration Manager detects that domain already exists (by GUID) and tries to update its parameters using domain name 'domain1.co.uk'. However, since such domain does not exist yet, error occurs.

In order to resolve the issue you can try to set up GUID for 'domain1.co.uk' on source server to another value:
# echo "UPDATE domains SET guid='$(uuidgen)' WHERE name='domain1.co.uk'" | mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa

Try this solution. I hope it will help.
 
Attempted fix, failed

I tried the fix on a test domain and it failed. Neither server has duplicate guids for different domains and guids that are present on both servers are for the same domain.

Thanks all the same for your quick response igor.

I feel sure this is something to do with the capital letters in some of the names (which we need to keep with upper case letters because of settings elsewhere for these domains), we only get this problem for those few domains which have mixed upper and lower case.

*******EDIT*******
Another issue just discovered is that /usr/local/psa/admin/plib/api-cli/spamassassin.php has the same problem when adding spamfilter information after a migration:

/usr/local/psa/admin/plib/api-cli/spamassassin.php --update [email protected] -status false -hits 4 -action mark -modify-subj-text _SCORE_

The above fails but using [email protected] works.
Possibly a few things need a strtolower putting in to modify input?
 
Last edited:
Hi Igor,

I will try to remember to use this in future, to save time.
There are two slightly separate issues, which I have put together because of their similarities.
If you would prefer these to be separated out into two separate issues (or there is another problem with the way I have filled this out) then I will be happy to edit this.

Thank you

---------------------------------------------------------------
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk Panel, 10.2, Linux/CentOS x68_64 (on both source and destination servers)

PROBLEM DESCRIPTION AND STEPS TO REPRODUCE
When migrating subscriptions with mixed upper and lower case domain names and/or emails with mixed upper/lower case, this produces errors.
With mixed case subscriptions this leads to mail accounts not being migrated properly. This can be reproduced by creating a subscription with a name that has upper case characters in it (for example DomainName.co.uk) and adding some mail accounts. Then by trying to migrate this to with the plesk migration manager. This should show the migration as successful but with errors.

With mixed case email accounts, there are errors transferring spam filter settings. This can be replicated by adding mail accounts to a subscription with capital letters in them (e.g. [email protected]), changing the spam filter settings for these to be different to default and then by trying to migrate them. The domain name should be all lower case. Migration should show errors.

ACTUAL RESULT

For mixed case domain names:
When looking at the logs there should be lines such as "Execution of /usr/local/psa/admin/plib/api-cli/mail.php --create [email protected] -passwd '' -mailbox true failed with return code 4.
Stderr is
Object not found: Domain DomainName.co.uk"
When trying to run these from command line (through ssh) they will also fail. HOWEVER if you change DomainName.co.uk to domainname.co.uk it will work.

For mixed case email addresses:
As with before you will see that it shows errors. The log will show lines stating that the execution of "/usr/local/psa/admin/plib/api-cli/spamassassin.php --update [email protected] -status false -hits 4 -action mark -modify-subj-text _SCORE_" failed.
As with the above changing upper case chars to the lower case equivalents in the commands will execute the command without errors.

EXPECTED RESULT
I think that these results will be replicated on other systems/servers.

ANY ADDITIONAL INFORMATION
Adding mail to domains with mixed case from the control panel seems to work fine. Does it use a different process to when we migrate?
--------------------------------------------------------------
 
Thank you for detailed report. I have forwarded it to developers. I will update thread with results of investigation as soon as I receive it.
 
Just as a note it is possible to change the domain name to be lower case and then migrate whithout problems creating the email accounts, however to change the domain name you can't just go from DoMain.com to domain.com. This gives the error that the domain already exists.
You have to change it to something different, for example domaain.com first.
Assuming the domain has capitalisation for a good reason, you would however have to change it again on both sides afterward and for a time you would have to cope with potential issues caused by that change. (For example during testing we realised our outlook email settings have to put the email address in in a case sensitive manner to retrieve from the server)

Unfortunately email address changes cannot be changed in a more direct manner either. You can change the case under the user tab but this does not affect the actual email addresses.
 
Last edited:
Since Plesk 11.5, which is in preview stage now,

mixed case in domain names and mailbox names are supported. Panel accepts domain names and mailbox names written in the mixed case.

One can download Plesk 11.5 for evaluation, but it is not for production servers.
The download links are in Plesk 11.5 Preview thread
We don't have ETA for 11.5 yet.
 
Back
Top