Articles in this section

Errors in Postfix logs: Unable to ARC sign, SKIP the message: Cannot read private key: [Errno 21] Is a directory: '...'

Plesk for Linux kb: technical

Symptoms

  • Some incoming messages show the following error in the Mail log:

CONFIG_TEXT: Feb 28 05:16:09 manage postfix-local[72830]: BDD476986: arc-sign: stderr: WARNING:main:Unable to ARC sign, SKIP the message: Cannot read private key: [Errno 21] Is a directory: '/etc/domainkeys/example.com/'

  • The Verify incoming mail option is enabled at Tools & Settings > Mail Server Settings > DKIM spam protection.

  • The folder and file exist:

# ls -l /etc/domainkeys/*
/etc/domainkeys/example.com:
-rw-r-----. 1 root popuser 887 May 31 2023 default

Cause

There are broken mail handlers parameters

Resolution

  1. Connect to the server via SSH.

  2. Check the mail handlers with broken references:

# plesk sbin mail_handlers_control --list --json | grep '"dkimsel="'
"context": "dkimsel=",

  1. Create a backup of the Plesk psa database:

# plesk db dump psa > /root/psa_dump.sql

  1. Open the Plesk psa DB:

# plesk db

  1. Run the following SQL query to populate the broken references:

MYSQL_LIN: INSERT INTO Parameters (id, parameter, value)
SELECT p.id, 'activeDkimSelector', 'default'
FROM domains d
JOIN DomainServices ds ON d.id = ds.dom_id AND ds.type = 'mail'
JOIN Parameters p ON p.id = ds.parameters_id AND p.parameter = 'domain_keys_sign' AND p.value = 'true'
LEFT JOIN Parameters pp ON pp.id = ds.parameters_id AND pp.parameter = 'activeDkimSelector'
WHERE pp.value IS NULL;

  1. Exit from Plesk psa DB:

MYSQL_LIN: quit;

  1. Repair mail configuration:

# plesk repair mail -y

  1. Recheck the mail handlers for broken references:

# plesk sbin mail_handlers_control --list --json | grep '"dkimsel="'
<empty>

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.