The usage of mailbox space is different in Plesk and on disk

Created:

2016-12-12 03:43:02 UTC

Modified:

2017-08-17 03:09:11 UTC

0

Was this article helpful?


Have more questions?

Submit a request

The usage of mailbox space is different in Plesk and on disk

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux

Note: This article has the reference to the issue with the fix available:

  • #PPPM-5114 "Mailbox size was reported incorrectly if the directory storing the mailbox data was stored on a partition with a specific file system (e.g. xfs)."
    Fixed in:
Please consider updating your server:

Symptoms

The usage of mailbox space differs between Plesk and mailbox directory on a server.

In Plesk > Subscriptions > example.com > Mail tab mail Usage shows 100MB.

But on the server the mailbox directory size is:

# du -sch /var/qmail/mailnames/example.com
350M /var/qmail/mailnames/example.com
350M total

Refreshing mail usage by clicking Refresh Usage Stats at Plesk > Subscriptions > example.com > "Mail" tab does not solve the issue.

Cause

This is Plesk bug with ID # PPPM-5114 that is planned to be fixed in future Plesk updates.

Resolution

Workaround for only Plesk Onyx

  1. Backup /usr/lib64/plesk-9.0/mail_mailbox_restore_backup :

    # cp /usr/lib64/plesk-9.0/mail_mailbox_restore /usr/lib64/plesk-9.0/mail_mailbox_restore_backup
  2. Download the custom fix

    # wget https://support.plesk.com/hc/article_attachments/115004356825/mail_mailbox_restore.zip
    # unzip mail_mailbox_restore.zip
  3. Replace unzipped fix:

    # cp mail_mailbox_restore /usr/lib64/plesk-9.0/
  4. Reconfigure mail:

    # /usr/lib64/plesk-9.0/mail_restore
  5. Execute daily maitenance task:

    # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php MailUsage
  6. Refresh mailbox usage by clicking Refresh Usage Stats at Plesk > Subscriptions > "Mail" tab .

Hotfix for Plesk 12.5 on CentOS 7.

  1. Download the fix for CentOS:

    # mkdir /root/tmp
    # wget -P /root/tmp https://support.plesk.com/hc/article_attachments/115004544529/mailbox-usage-pp12.5.30-cos7x64-postfix.tar.gz
  2. Extract the fix:

    # tar -xvzf /root/tmp/mailbox-usage-pp12.5.30-cos7x64-postfix.tar.gz
  3. Back up original files:

    # mv /usr/local/psa/admin/sbin/mailbox_usage /usr/local/psa/admin/sbin/mailbox_usage.bak

    # mv /usr/local/psa/admin/sbin/mailmng-core /usr/local/psa/admin/sbin/mailmng-core.bak

    # mv /usr/local/psa/handlers/hooks/check-quota /usr/local/psa/handlers/hooks/check-quota.bak

    # mv /usr/lib64/plesk-9.0/mail_mailbox_restore /usr/lib64/plesk-9.0/mail_mailbox_restore.bak
  4. Replace the original files with fixed ones:

    # cp /root/tmp/usr/lib64/plesk-9.0/mail_mailbox_restore /usr/local/psa/admin/sbin/mailbox_usage

    # cp /root/tmp/usr/local/psa/admin/sbin/mailmng-core /usr/local/psa/admin/sbin/mailmng-core

    # cp /root/tmp/usr/local/psa/handlers/hooks/check-quota /usr/local/psa/handlers/hooks/check-quota

    # cp /root/tmp/usr/lib64/plesk-9.0/mail_mailbox_restore /usr/lib64/plesk-9.0/mail_mailbox_restore
  5. Run the Daily Maintenance script to recalculate mailbox usage:

    # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php MailUsage
  6. Refresh mailbox usage by clicking Refresh Usage Stats at Plesk > Subscriptions > "Mail" tab .

Hotfix for Plesk 12.5 on Debian 7.

  1. Download the fix for Debian:
    # wget -P /root/ https://support.plesk.com/hc/en-us/article_attachments/115002647765/PPPM-5114-debian.tar
  2. . Unpack the archive:
    # tar -C /root/ -xvf PPPM-5114-debian.tar
  3. Backup the original file:
    # cp -a /opt/psa/admin/sbin/mailmng-server /opt/psa/admin/sbin/mailmng-server.`date +%F.%s`.backup
  4. Copy fixed file to the directory /opt/psa/admin/sbin/ replacing the original file:
    # cp -a  /root/mailmng-server /opt/psa/admin/sbin/
  5. Set required ownership and permissions for the file:
    # chown root:root /opt/psa/admin/sbin//mailmng-server
    # chmod 0755 /opt/psa/admin/sbin//mailmng-server
    # stat /opt/psa/admin/sbin/mailmng-server
      File: '/opt/psa/admin/sbin/mailmng-server'
      Size: 649592          Blocks: 1272      IO Block: 4096  regular file
    Device: 5560b621h/1432401441d  Inode: 145000      Links: 1
    Access: (0750/-rwxr-x---)  Uid: (    0/    root)  Gid: (    0/    root)
  6. Run the Daily Maintenance script to recalculate mailbox usage:
    # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php MailUsage
  7. Refresh mailbox usage by clicking Refresh Usage Stats at Plesk > Subscriptions > "Mail" tab .

Attachments:

Have more questions? Submit a request
Please sign in to leave a comment.