Articles in this section

Unable to send or receive email with Plesk Email Security extension installed

Plesk for Linux kb: technical ext: email-security mail

Applicable to:

  • Plesk for Linux

Symptoms

  • Unable to receive email on the Plesk server, the process fails with the next error message in /var/log/maillog file:

    CONFIG_TEXT: Jan  6 10:01:30 server amavis[1771804]: (1771804-01) (!)connect_to_sql: unable to connect to DSN 'DBI:MariaDB:database=emailsecurity;mysql_socket=/var/lib/mysql/mysql.sock': Unknown attribute mysql_socket
    Jan  6 10:01:30 server amavis[1771804]: (1771804-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at /usr/share/perl5/vendor_perl/Amavis/Out/SQL/Connection.pm line 255.
    Jan  6 10:01:30 server amavis[1771804]: (1771804-01) (!)Requesting process rundown after fatal error
    Jan  6 10:01:30 server postfix/smtp[1774083]: 4734718E03471: to=<john@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.5, delays=0.47/0/0.01/0.01, dsn=4.3.2, status=deferred (host 127.0.0.1[127.0.0.1] said: 421 4.3.2 Service shutting down, closing channel (in reply to RCPT TO command))
     

  • Plesk Email Security extension is installed
  • Installed MariaDB

Cause

This is a Plesk Email Security product issue with ID #EXTPLESK-10075. The issue was fixed in Plesk Email Security 1.5.23

Resolution

Update Plesk Email Security extension to the latest version (1.5.23):

  1. Login into Plesk
  2. Navigate to Extensions > Updates menu
  3. Press Check Now button, then select Plesk Email Security and press on Update button, like on screenshot below:

Workaround (if updating PES is not possible for some reason):

  1. Connect to the Plesk server via SSH.
  2. Using the vi text editor open the /etc/amavisd/email-security.conf file
  3. Find and change the value for the mysql_socket to mariadb_socket as below:

    CONFIG_TEXT: ["DBI:MariaDB:database=emailsecurity;mariadb_socket=/var/lib/mysql/mysql.sock", "es_***", "******"]

  4. Save changes
  5. Using the vi text editor open the /etc/mail/spamassassin/local.cf
  6. Find and change the value for the mysql_socket to mariadb_socket as below:

    CONFIG_TEXT: bayes_sql_dsn DBI:mysql:emailsecurity:mariadb_socket=/var/lib/mysql/mysql.sock

  7. Save changes
  8. Restart the Amavis service:

    # systemctl restart amavisd.service

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.