• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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 issue on plesk mail migrator

fabieng

Basic Pleskian
Server operating system version
debian12.6
Plesk version and microupdate number
Product: Plesk Obsidian 18.0.62 Update #2
hello
I'm trying to impor mail but I have this error :
Command execution failed on the local server with non-zero exit code.
command: /usr/local/psa/admin/plib/modules/site-import/backend/lib/python/parallels/core/extras/mail-migrator/linux/mail-migrator migrate --source-account-description-file=/usr/local/psa/var/modules/site-import/sessions/mail-migration-24/mail_migrator_source_account_2024-08-02-12-48-54-1_1 --source-message-ids-cache-file=/usr/local/psa/var/modules/site-import/sessions/mail-migration-24/mail_message_ids_cache.acc90f9cf9783b38e53fb5adcc4a016a --target-account-description-file=/usr/local/psa/var/modules/site-import/sessions/mail-migration-24/mail_migrator_target_account_2024-08-02-12-48-54-1_1 --backup-progress-file=/usr/local/psa/var/modules/site-import/sessions/mail-migration-24/mail_migrator_backup_progress_2024-08-02-12-48-54-1_1.json --restore-progress-file=/usr/local/psa/var/modules/site-import/sessions/mail-migration-24/mail_migrator_restore_progress_2024-08-02-12-48-54-1_1.json --source-ca-bundle=/usr/local/psa/admin/plib/modules/site-import/backend/lib/python/parallels/core/extras/cacert/cacert.pem --target-server-type=dovecot --source-allow-insecure-connections=true --source-host=ssl0.ovh.net --stop-mark-file=/usr/local/psa/var/modules/site-import/sessions/mail-migration-24/tasks/2024-08-02-12-48-54-1/stop
exit code: 1
stdout:
stderr: Failed to backup message #72 (UID 675) in IMAP folder '"INBOX"': 'utf-8' codec can't decode byte 0xe9 in position 3229: invalid continuation byte

Failed to backup message #169 (UID 1051) in IMAP folder '"INBOX"': 'utf-8' codec can't decode byte 0xe9 in position 4341: invalid continuation byte

Failed to backup message #191 (UID 1112) in IMAP folder '"INBOX"': 'utf-8' codec can't decode byte 0xe9 in position 4426: invalid continuation byte

Failed to backup message #246 (UID 1356) in IMAP folder '"INBOX"': 'utf-8' codec can't decode byte 0xe9 in position 5343: invalid continuation byte

Failed to backup message #3 (UID 8) in IMAP folder '"INBOX.&AMk-l&AOk-ments envoy&AOk-s"': 'utf-8' codec can't decode byte 0xe9 in position 1365: invalid continuation byte

Failed to backup message #5 (UID 10) in IMAP folder '"INBOX.&AMk-l&AOk-ments envoy&AOk-s"': 'utf-8' codec can't decode byte 0xe9 in position 1289: invalid continuation byte

Failed to backup message #12 (UID 17) in IMAP folder '"INBOX.&AMk-l&AOk-ments envoy&AOk-s"': 'utf-8' codec can't decode byte 0xe9 in position 1323: invalid continuation

is it due to remote mail ? how to solve it ?
 
Hello, everyone. Our team was able to determine the root cause of the issue, which is related to the mismatch in the encoding. The process fails for specific mailboxes if they contain messages encoded in charset other than utf-8. Our team is doing its best to fix the issue as soon as possible. The bug ID is PMT-5354. You may observe changes in our Plesk change log

In the meantime, the alternative we can suggest is a possible workaround described in the article about the issue:

 
Solved !!!

Hi, I have put ticket in plesk and they have fixed it but you have to update,

I have already upgraded. and I will try it out.

Thanks to all the plesk team, you are the best!
---

A technician tells me:

Thank you for your patience!

This is to let you know that the Mail Importer issue has been resolved. Please re-attempt to migrate the mails. Additionally, there has been a new release today for Plesk Migrator. Verify if your server has the latest update. If not, you may download it to your server from the following release patch:

Plesk Migrator Package: Plesk Migrator - Plesk Extensions

Alongside, if uploading the update is not available, please proceed as per our forum. Feel free to let us know if this causes any other issues and we will gladly assist you.

Should you have any additional questions or concerns - we are at your service.
 
We have released an update which fixes the "utf-8' codec can't decode" error. If you have automatic updates enabled this update should be installed automatically. Site Import 1.8.1:

Fixed the issue where migration of mailboxes with emails that contained some Latin-1 encoded symbols could fail. (PMT-5354)

Please let us know if you encounter any further issues.
 
It appears that this update leads to other issues. Since updating to Site Import 1.8.1 I get the following errors when importing files from another server:

Code:
Failed to copy files of source folder '/var/www/vhosts/*****' to '/var/www/vhosts/*****' on the target server.
Transfer the folder manually to the target server. [Hide details]
Command execution failed on the local server with non-zero exit code.
command: su ***** --shell /bin/sh -c '/usr/local/psa/admin/plib/modules/site-import/backend/lib/python/parallels/core/extras/web-stream-downloader/web-stream-downloader --config-file -'
exit code: 1
stdout:
stderr: Traceback (most recent call last):
File "/usr/local/psa/admin/plib/modules/site-import/backend/lib/python/parallels/core/extras/web-stream-downloader/web-stream-downloader", line 3, in <module>
from web_stream_downloader.main import main
File "/opt/psa/admin/plib/modules/site-import/backend/lib/python/parallels/core/extras/web-stream-downloader/web_stream_downloader/main.py", line 4, in <module>
import urllib2
ModuleNotFoundError: No module named 'urllib2'
 
Hello, @didjee. Thank you for reporting the error. That issue has already been brought to our team's attention and it is currently under investigation. As soon as we have more details on what might be causing it and a possible solution we will let you know. Thank you for your patience in the meantime.
 
Hey, everyone. Just wanted to let you know that our team introduced a fix for the error reported by @didjee in Site Import 1.8.4. If you notice any further issues, please do let us know. We would like to thank once again to everyone for reporting the errors.
 
I still have issues migrating mailboxes. it's getting stuck after a few mails with the "Exit code of restore command: 2".
 
On a Windows server it should be at:
It looks like it never print anything to the log, it just stuck in the migration proccess. Only if I cancel the proccess it print this error:

"Restore command: "C:\Program Files (x86)\Plesk\admin\plib\modules\site-import\backend\lib\python\parallels\core\extras\mail-migrator\windows\MailMigrator.exe" restore --account-description-file="C:\Program Files (x86)\Plesk\var\modules\site-import\sessions\mail-migration-32\mail_migrator_target_account_2024-09-26-19-26-56-1_1" --progress-file="C:\Program Files (x86)\Plesk\var\modules\site-import\sessions\mail-migration-32\mail_migrator_restore_progress_2024-09-26-19-26-56-1_1.json" --stop-mark-file="C:\Program Files (x86)\Plesk\var\modules\site-import\sessions\mail-migration-32\tasks\2024-09-26-19-26-56-1\stop"
Exit code of restore command: 2
Stderr of restore command:"


1727445737527.png
I've tried to import 2 different emails, from two different domains with the same result.
 
Back
Top