Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Mail import sessions are not shown in the Mail Importing menu: Failed to write final import status to a file

 
backup restore migrationdomainsgolinuxmail

Symptoms

  • On attempt to start a new import session at Domains > example.com > Mail Importing, the page gets back to the import screen and does not show any session or status.

  • Previous import sessions are missing at Domains > example.com > Mail Importing.

  • The following error is shown in /usr/local/psa/var/modules/site-import/sessions/mail-migration-XX/debug_XXX.log:

    |D|MT|core.workflow.runner.by_subscription||| File "/opt/plesk/python/2.7/lib64/python2.7/json/decoder.py", line 369, in decode
    |D|MT|core.workflow.runner.by_subscription||| raise ValueError(errmsg("Extra data", s, end, len(s)))
    |D|MT|core.safe|||ValueError: Extra data: line 52 column 2 - line 52 column 3 (char 1748 - 1749)
    |E|MT|core.safe|||Failed to write final import status to a file

Cause

Site Import cannot read or write to one of the JSON files because it has improper format.

This issue is a Plesk Migrator bug with ID PMT-4988 that is planned to be fixed in future product updates.

Resolution

 

For Plesk on Linux

 

Clear the session folder

 

Note: In this case, previous import sessions will be lost for the domain.

  1. Connect to the Plesk server via SSH.

  2. Find the ID of the domain to which mail content is being migrated:

    # plesk db "select id from domains where name='example.com'"
    +----+
    | id |
    +----+
    | 89 |
    +----+

  3. Remove everything from the session folder of the domain. Use ID found on step 2:

    1. On Linux:

      # rm -rf /usr/local/psa/var/modules/site-import/sessions/mail-migration-89

    2. on Windows Server

      %plesk_dir%varmodulessite-importsessionsmail-migration-89

  4. In Plesk, go to Domains > example.com > Mail Importing.

  5. Cancel previous import sessions that have their status stuck at "In progress" (if there are any).

 

(Advanced) Fix the corrupted JSON file on Linux

 

  1. Connect to the Plesk server via SSH.

  2. Find the ID of the domain to which mail content is being migrated:

    # plesk db "select id from domains where name='example.com'"
    +----+
    | id |
    +----+
    | 89 |
    +----+

  3. Go to the migration session directory of this domain. Use ID found on step 2:

    # cd /usr/local/psa/var/modules/site-import/sessions/mail-migration-89

  4. Run the following script to find corrupted JSON files inside the direcotry:

    # ls *.json | while read i; do echo $i; python -mjson.tool $i > /dev/null ; done

    On some systems, the utility python2 is used instead of python. In this case, run:

    # ls *.json | while read i; do echo $i; python2 -mjson.tool $i > /dev/null ; done

  5. Look through the output to find the corrupted JSON file:

    mail_migration_status.json
    Extra data: line 52 column 2 - line 52 column 3 (char 1748 - 1749)

  6. Use any JSON syntax parser tool (for example, JSONLint JSON Validator) to fix the corrupted JSON file.

  7. In Plesk, go to Domains > example.com > Mail Importing.

  8. Cancel previous import sessions that have their status stuck at "In progress".

 

(Advanced) Fix the corrupted JSON file on Windows Server

 

  1. Connect to the Plesk server via RDP.

  2. Start PowerShell prompt.

  3. Find the ID of the domain to which mail content…

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Check Open Ports in Linux (Simple Commands & Tools)

Read More »

Linux Logs Explained

Read More »

How to Host a Go App on Plesk

Read More »
Knowledge Base

Websites on Plesk server are slow or show error 500 or PHP mail cannot be sent: ap_pass_brigade failed

Read More »

Unable to issue a Let’s Encrypt certificate for a domain or its mail in Plesk: the DNS challenge used another IP address

Read More »

Unable to send mail from Plesk server: deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

Read More »

Can’t access mail: Warning: Inotify instance limit for user exceeded

Read More »

Hosting Wiki

  • Django
  • Server Redundancy
  • QMAIL
  • Sendmail
  • Linux Containers
  • Google Cloud CDN
  • AMP
  • Bare Metal Server
  • Backup
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Python
  • MongoDB
  • Domain
  • Plesk
  • Web Server
  • DNS Server
  • SSH
  • Email Autoresponder
  • Mailing Lists
  • Email Alias
  • Email Virus Protection
  • Email Forwarding
  • Webmail
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family