Author Topic: CWP 1.7 on AlmaLinux 9: DKIM Generated but Not Applied by Postfix  (Read 38 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
  • Control panel: CWP 1.7
  • Operating system: AlmaLinux 9.8
  • MTA: Postfix
  • DKIM service: OpenDKIM
  • Mail filtering: Amavis
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.
_
Distro Name: AlmaLinux release 9.8 (Olive Jaguar)
CWPpro version: 1.7
Web Servers: nginx-apache

Offline
*****
Thanks for the detailed writeup. This has been a known issue with AlmaLinux 9 and CWP. See here for more info:
https://starburst.help/control-web-panel-cwp/control-web-panel-cwp-admin-tutorials/dkim-not-working-on-almalinux-9-with-cwp/