Q: Can I use localhost as servername for migration?
A: Short answer: No. Please read on for more information.
I entererd localhost, 127.0.0.1 or 192.168.x.x as servername. The checks were successful, but the emails were not transferred. Why is this?
As its name says, 'localhost' is the name of the local computer you are currently working with. Every computer can refer to itself as localhost, or 127.0.0.1 (which is the IP equivalent to localhost). A IP from the range 192.168.0.0/16 is a similar case. This IP range is reserved for local assigning, i.e. traffic originating from this block is not routed to the internet directly. Within this IP range, computers can only address other computers in the same network. Also they cannot be addressed from computers outside this network. Formally, this hostname / these IPs is/are correct, so the checks must be successful. Lets have a closer look at the 'why':
As we already learned, localhost and 127.0.0.1 refer to the local computer itself. So queries to these addresses and answers from these addresses never leave the querying server, meaning that all queries are done locally. Traffic within 192.168.0.0/16 is not routed from/to the internet, so computers outside this network cannot address a computer in this network (directly) using such an IP.
Now our our migration servers are neither your 'localhost', nor within your 192.168.0.0/16 network. So our migration servers cannot address your server using this method, as this is local only.
If our migration servers should address 127.0.0.1 / localhost, they address (you already guessed it) - themselves.
Now the solution is to use a public address, like a publicly addressable domain (using the DNS system), or a publicly routed IP - both methods will work.
But please, never (!) use local hostnames/Domains only!
Now for the interesting part: why does the check not display an error?
As already said, localhost refers to the local computer only - your Plesk server in this case.
Of course, your server can address itself, and check the mail credentials locally. So formally, your credentials (including hostname) are correct. Unfortunately, our migration servers, that do the 'real' migration job, can only address themselves using localhost, as explained above.
So to conclude: never use 'localhost', 127.0.0.1, or a local only IP such as 192.168.0.0/16 as you server name when using the migration extension!
Doing so will result in a migration that has been finished, but your emails have not been transferred due to the reasons stated above.
Hopefully, this FAQ entry has made things a bit clearer regarding local addressing, and why this doesn't work.