# OpenDKIM — per-domain signing. # # Signing is strictly per-domain: each sending domain has its own key pair and # selector. The panel generates keys under /data/opendkim/keys// and # keeps KeyTable/SigningTable in sync as domains are added or removed, then asks # supervisord to send this process SIGUSR1 to reload the tables. (OpenDKIM # 2.11.0~beta2, opendkim/opendkim.8.in: on SIGUSR1 the configuration file is # re-read; opendkim/opendkim.c, dkimf_config_reload() -> dkimf_config_load(), # opens SigningTable and KeyTable again with dkimf_db_open().) # # Both table files are created (empty) by entrypoint.sh before OpenDKIM starts, # so the daemon comes up cleanly on a fresh /data with no domains yet and simply # signs nothing until the first domain is added. (opendkim/opendkim-db.c, # dkimf_db_open(): a file or refile table is read line by line; an empty file # is an empty table, not an error.) Syslog no UMask 007 Mode s # SigningTable uses refile: so the "*@example.com" left-hand patterns match any # local-part for a domain; KeyTable maps each domain to its key and selector. # (opendkim/opendkim.conf.5.in, SigningTable: with "refile" the keys are # wildcard patterns matched against the From: address, in file order.) KeyTable /data/opendkim/KeyTable SigningTable refile:/data/opendkim/SigningTable # The private keys are owned by `panel` and read by `opendkim` through the shared # `selfpost` group, so they are deliberately group-readable (mode 0640). That is # safe on this single-tenant, private bind mount, but it trips OpenDKIM's default # key-safety check, so the check is disabled here by design. (opendkim/ # opendkim.c, dkimf_checkfsnode(): a key file must be owned by root or by the # executing uid, and a group-readable one must be in a group of no other user - # `panel` owns these and `selfpost` has three members.) RequireSafeKeys no # UMask 007 above leaves the socket group read-write (opendkim.conf.5.in, # UMask: it applies to the socket); its group is selfpost by the setgid # /run/opendkim (build/entrypoint.sh). UserID: the process takes the user's # groups (opendkim.conf.5.in, UserID); with Background no and -f # (build/supervisord.conf, opendkim.8.in) the supervised pid is OpenDKIM itself. Socket local:/run/opendkim/opendkim.sock PidFile /run/opendkim/opendkim.pid UserID opendkim Background no