Article ID: 115395, created on Jan 11, 2013, last review on May 11, 2014

  • Applies to:
  • Plesk 11.0 for Linux

Problem Description

The problem is as follows:
  1. If using the permanent error (5.X.X), the sender receives an immediate bounce (Backscatter) notifying them of the impossibility of delivering the email to the recipient. (This is what many of our customers want.)
  2. If using the temporary error (4.X.X), the overall performance of the mail system is affected because of the greater number of delivery attempts by the remote MTA to the Plesk server where the temporary error in usage. Therefore, in the case that Qmail is used as the remote MTA, 40 delivery attempts are performed instead of one:
  3. However, RFC recommends using the temporary error. In general, this is more logical in terms of the delivery of automated correspondence (from payment systems, for example), but not when it comes to the delivery of email from a friend, who can immediately call and tell you that your mailbox is full.


Starting from version 11.0.9 MU#29, you can change the error code for the "Mailbox full" error, although it is not recommended (see point 3 in the above problem description).
To do this:
  1. Create a new mailhandler with a higher priority than the normal handler check-quota (10):
    # /usr/local/psa/admin/sbin/mail_handlers_control --add --priority=5 --name=check-quota-permanent --queue=before-queue --type=global --mailname=all-recipients --executable=/usr/local/psa/handlers/hooks/check-quota --context=permanent --enabled
  2. Correct the recipients of the new handler:
    # sqlite3 -line /var/lib/plesk/mail/handlers/handlers.db 'update handlers set address="all-recipients" where name="check-quota-permanent"'
  3. In order for the usual mail handler check-quota to not call after the handler is executed as check-quota-permanent, it must be disabled:
    # /usr/local/psa/admin/sbin/mail_handlers_control --disable --name=check-quota --type=global --queue=before-queue
If all goes well, you should get the following result:
# /usr/local/psa/admin/sbin/mail_handlers_control --list | grep check-quota
| | 10 | all-recipients | check-quota | global | before-queue |
| X | 5 | all-recipients | check-quota-permanent | global | before-queue |

Note: After resetting the mailserver with the "mchk" utility or after a Plesk upgrade, this workaround will be removed, and you should apply all these commands again. It can also be removed after the installation of MUs with fixes for the MTA or when changing the MTA from Postfix to Qmail or vice versa. To prevent it, you can use the scheduled task for running a custom shell script with the following commands:
/usr/local/psa/admin/sbin/mail_handlers_control --remove --name=check-quota-permanent --queue=before-queue --type=global

/usr/local/psa/admin/sbin/mail_handlers_control --add --priority=5 --name=check-quota-permanent --queue=before-queue --type=global --mailname=all-recipients --executable=/usr/local/psa/handlers/hooks/check-quota --context=permanent --enabled

sqlite3 -line /var/lib/plesk/mail/handlers/handlers.db 'update handlers set address="all-recipients" where name="check-quota-permanent"'

/usr/local/psa/admin/sbin/mail_handlers_control --disable --name=check-quota --type=global --queue=before-queue

However, this can lead to unpredictable collisions with new versions of Plesk. Therefore, use it at your own risk.

aea4cd7bfd353ad7a1341a257ad4724a 56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f

Email subscription for changes to this article
Save as PDF