Fedora Account System
Red Hat Associate
Red Hat Customer
after generating the keypair with opendkim-genkey I placed in the path recommended in /usr/share/doc/opendkim/README (/var/db/dkim) with the recommended permissions. When trying to start the service, the error that I encounter is: /var/db/dkim/mail09oct2025.private: key data is not secure: opendkim is in group 0 which has multiple users (e.g., "sync") From what I'm able to get from the message, opendkim would not start if the user is in group 0, where there are other members. But the user opendkim is not in group 0. And in fedora there are plenty of users that have 0 as their primary group. [root@mail ~]# id opendkim uid=990(opendkim) gid=990(opendkim) groups=990(opendkim),12(mail) [root@mail ~]# ls -laZ /var/db/dkim/ total 4 drwx------. 1 opendkim opendkim system_u:object_r:system_db_t:s0 42 Oct 9 21:23 . drwxr-xr-x. 1 root root system_u:object_r:system_db_t:s0 16 Oct 9 21:23 .. -rw-------. 1 opendkim opendkim system_u:object_r:system_db_t:s0 912 Oct 9 20:36 mail09oct2025.private [root@mail ~]# getent group 0 root:x:0: [root@mail ~]# awk -F':' '$4 == 0 {print $1" - "$4}' /etc/passwd root - 0 sync - 0 shutdown - 0 halt - 0 operator - 0 Also found here: https://serverfault.com/questions/1025867/dovecot-postfix-cannot-retrieve-email-from-server-due-to-connection-timing-out/1056084#1056084 Reproducible: Always Steps to Reproduce: 1.opendkim-genkey -r -s mail09oct2025 -d tpc.jacket.lime 2.create and set the right permissions and labels on /var/db/dkim 3. move key to /var/db/dkim 4. start the service Actual Results: The service does not start, and the error message is the following: /var/db/dkim/mail09oct2025.private: key data is not secure: opendkim is in group 0 which has multiple users (e.g., "sync") Expected Results: Should have started as the permissions on the key and path seem to align with the recommendations in the README Additional Information: As a workaround, /etc/opendkim.conf could have the option: RequireSafeKeys False but having this check turned off is not pretty and is probably a bad idea for users.
I checked through the code [1] and it's searching up the directory hierarchy. The error message is misleading, the issue is with the file system permissions not the opendkim account. Eventually it finds write permissions for the root group on / which fails because it doesn't allow any files/directories to have group write where the group has multiple users in it. This group write permission on the filesystem root directory was added in Fedora 40 on the cloud images. I haven't checked the other images. Fedora 39 $ ls -al / dr-xr-xr-x. 1 root root 138 Nov 1 2023 . Fedora 40 $ ls -al / drwxrwxr-x. 1 root root 212 Nov 10 2024 . I removed group write from the / directory to verify this is the only directory in the hierarchy causing the issue. [1]: https://github.com/trusteddomainproject/OpenDKIM/blob/5c539587561785a66c1f67f720f2fb741f320785/opendkim/opendkim.c#L4452
This message is a reminder that Fedora Linux 42 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 42 on 2026-05-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '42'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 42 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 42 entered end-of-life (EOL) status on 2026-05-27. Fedora Linux 42 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.