As per title, when the FQDN is changed the DKIM keys are not updated, and still holds the ‘old’ FQDN.
responsible code:
/etc/e-smith/events/nethserver-mail-server-update/S40nethserver-mail-create-opendkim-key
snippet:
…
if ((! -f “/etc/opendkim/keys/default.private”) || (! -f “/etc/opendkim/keys/default.txt”)) {
system ("/usr/sbin/opendkim-genkey -b 2048 -D /etc/opendkim/keys/ -d $domainName") == ‘0’||
die “[ERROR] Opendkim cannot create correctly keys: $?”;
}
…
The code checks if there are DKIM keys and if not, generate the keys. Since there is a FQDN change, there are keys so no new ones are generated.
By removing the old key manually and executing S40nethserver-mail-create-opendkim-key mannually, new and correct keys are generated.
HTH