Control Web Panel

WebPanel => E-Mail => DKIM => Topic started by: NAZA on August 09, 2026, 12:30:14 AM

Title: CWP 1.7 on AlmaLinux 9: DKIM Generated but Not Applied by Postfix
Post by: NAZA on August 09, 2026, 12:30:14 AM
Problem

CWP generated the DKIM key and the corresponding DNS record correctly. The CWP interface showed Install DKIM & SPF enabled, and the OpenDKIM service was running.

However, messages sent to external providers arrived with:

Code: [Select]
dkim=none (message not signed)
spf=pass
dmarc=pass

The local OpenDKIM key test was successful:

Code: [Select]
opendkim-testkey -d example.tld -s default -vvv
key OK

The problem was not the DKIM key or the DNS record. Postfix was not connected to OpenDKIM.

Diagnosis

After using Rebuild Mail Server, CWP recorded:

Code: [Select]
dkimspf = 1

However, the effective Postfix configuration did not contain:

Code: [Select]
smtpd_milters
non_smtpd_milters
content_filter

The SMTP service for Amavis existed in
Code: [Select]
master.cf, but the line connecting Postfix to Amavis was commented:

Code: [Select]
# -o content_filter=smtp-amavis:127.0.0.1:10024

Therefore, CWP generated the DKIM infrastructure, but the outgoing Postfix delivery path did not use OpenDKIM.

Solution

The integration was added directly to
Code: [Select]
/etc/postfix/main.cf:

Code: [Select]
smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = inet:127.0.0.1:8891
milter_default_action = accept
milter_protocol = 6

No internal CWP scripts were modified.

After reloading Postfix, the active configuration showed:

Code: [Select]
smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = inet:127.0.0.1:8891
milter_default_action = accept
milter_protocol = 6

External validation

Test messages were sent to Gmail and Outlook.

Gmail reported:

Code: [Select]
dkim=pass
spf=pass
dmarc=pass

Outlook reported:

Code: [Select]
dkim=pass
spf=pass
dmarc=pass
compauth=pass

Conclusion

In this installation, CWP generated the DKIM keys and DNS records correctly, but the mail server rebuild did not connect Postfix to OpenDKIM.

Adding the local OpenDKIM milter settings to Postfix resolved the issue without modifying CWP internal scripts.