Articles in this section

Unable to install Plesk Email Security: Access denied

Plesk for Linux kb: technical ext: email-security

Symptoms

  • On a Plesk for Linux server, installing the extension Plesk Email Security in the menu Extensions > Plesk Email Security > Install Now fails:

    PLESK_ERROR: Access denied

  • The following error can be spotted in the log file /var/log/plesk/panel.log with debug enabled:

    CONFIG_TEXT: 35162:63b174e633218 ERR [panel] pm_Exception: Access denied
    file: /usr/local/psa/admin/plib/modules/email-security/library/Component/Dovecot.php
    line: 227
    code: 0
    trace: #0 /usr/local/psa/admin/plib/modules/email-security/library/Component/Dovecot.php(240): PleskExt\EmailSecurity\Component\Dovecot::mailDir(string 'johndoe@example.com')

Cause

Mailbox johndoe@example.com still exists in SpamAssassin database but it does not exist in Plesk in Domains > example.com > Mail > Email Addresses.

# plesk db "select * from spamfilter;"
+----+--------------------------------+---------------+-------------+
| id | username | serviceNodeId | preferences |
+----+--------------------------------+---------------+-------------+
| 1 | @ | 1 | true |
| 2 | johndoe@example.com | 1 | true |

Resolution

  1. Connect to the server via SSH.

  2. Download the fixing script and make it executable:

    # wget https://raw.githubusercontent.com/plesk/kb-scripts/refs/heads/master/pes-sa-remove/spamfilter_fix.php && chmod +x spamfilter_fix.php

  3. Run the script to show the inconsistencies:

    # plesk php spamfilter_fix.php

    To automatically fix them, use the -f flag:

    # plesk php spamfilter_fix.php -f

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.