I am having a hard time in debugging this error:
Syslog:
Apr 24 06:18:08 abcex opendkim[24223]: abcex: key data is not secure: /etc/opendkim/keys/abcex.private
Apr 24 06:18:08 abcex opendkim[24223]: 28E1C29C5FB: error loading key 'abcex'
pr 24 06:18:08 abcex postfix/cleanup[24394]: A21DE29C5FB: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 4.7.1 Service unavailable - try again later; from=<root@abcex.com> to=<admin@abcex.com>
Here is the output from namei -l /etc/opendkim/keys/abcex.private
drwxr-xr-x root root /
drwxr-xr-x root root etc
drwxr-xr-x opendkim opendkim opendkim
drwxr-xr-- opendkim opendkim keys
-rwxr-xr-- opendkim opendkim abcex.private
However testing is working fine:
opendkim-testkey -d abcex.com -s 201804 -vvv
opendkim-testkey: using default configfile /etc/opendkim.conf
opendkim-testkey: /etc/opendkim/keys/abcex.private: WARNING: unsafe permissions
opendkim-testkey: key loaded from /etc/opendkim/keys/abcex.private
opendkim-testkey: checking key '201804._domainkey.abcex.com'
opendkim-testkey: key not secure
opendkim-testkey: key OK
Output from dig is also fine
dig 201804._domainkey.abcex.com txt +short
"v=DKIM1; h=sha256; k=rsa; s=email; p=...."
I have looked at similar questions but not finding solutions. I have changed permissions as per OpenDKIM errors.
Also looked at https://sourceforge.net/p/opendkim/support-requests/19/, https://sourceforge.net/p/opendkim/support-requests/13/ but not finding any solution.
Please help.