How to change notifications subject?

Refers to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 12:39:32 UTC

Modified:

2017-01-26 07:34:07 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to change notifications subject?

Question

Only the content of notification message can be changed via Plesk at Tools & Settings > Notifications.

How to change a subject of the notification emails?

Answer

Subject strings for notifications can be changed in Plesk configuration database only by following the steps:

  1. Create a database backup:

    mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` psa > /tmp/psa.`date +%F_%H.%M`.sql
  2. Check notification subjects:

    # mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -Ne"select * from Notifications"
    +----+--+---+---+---+---+---+-------------------------------+----------------------------------------------------------------------------+------+
    | 1  |  | 1 | 1 | 1 | 0 | 1 | john.doe@gmail.com            | Notification of the customer creation                                      |  1   |
    | 2  |  | 0 | 0 | 1 | 0 | 0 |                               | Notification of the site creation.                                         |  2   |
    | 3  |  | 0 | 0 | 1 | 0 | 0 |                               | Notification: Resource usage by subscription has exceeded the allotments.  |  3   |
    | 6  |  | 0 | 0 | 1 | 0 | 0 |                               | Subscription event notification: The subscription term has expired.        |  6   |
    | 7  |  | 0 | 0 | 1 | 0 | 0 |                               | Subscription event notification: The subscription term is about to expire. |  7   |
    | 12 |  | 1 | 0 | 0 | 0 | 0 |                               | Application Manager Error notification.                                    | 12   |
    | 13 |  | 1 | 1 | 0 | 0 | 0 |                               | Notification of the reseller creation.                                     | 13   |
    | 16 |  | 1 | 1 | 0 | 0 | 0 |                               | Notification: Resource limits exceeded by reseller account.                | 16   |
    | 18 |  | 0 | 0 | 1 | 0 | 0 |                               | Notification: Subscription was suspended due to resource overuse.          | 18   |
    | 20 |  | 1 | 1 | 0 | 0 | 0 |                               | Notification: Reseller account has exceeded its limits and was suspended.  | 20   |
    | 22 |  | 0 | 1 | 0 | 0 | 0 |                               | Notification: Resources overuse blocked for reseller account.              | 22   |
    +----+--+---+---+---+---+---+-------------------------------+----------------------------------------------------------------------------+------+
  3. Update the desired subject (use the id field for selecting desired event notification).

    For example if you want to change Customer account creation event notification subject run the following:

    mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -e"update Notifications set subj='Changed - Notification of the customer creation' where id=1"

Please note that the event notification subject also contains the hostname of the Plesk server, so the subject looks like:

<example.com> Changed - Notification of the customer creation

That value - example.com - cannot be changed within notification subject.

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