Why doesn't dkim sign the letter?

It appears you have accidentally missed the section in the tutorial titled "Connect Postfix to OpenDKIM", which configures OpenDKIM on Unix domain sockets instead of the default TCP configuration.

The postfix process is chrooted in /var/spool/postfix, so supporting Unix sockets requires creating a directory for the sockets with appropriate permissions:

sudo mkdir /var/spool/postfix/opendkim
sudo chown opendkim:postfix /var/spool/postfix/opendkim

Change the opendkim configuration to support domain sockets:

sudo nano /etc/opendkim.conf

Change to match:

#Socket inet:8891@localhost
Socket local:/var/spool/postfix/opendkim/opendkim.sock

Edit main.cf to support the configuration:

sudo nano /etc/postfix/main.cf

Change:

smtpd_milters = local:opendkim/opendkim.sock
non_smtpd_milters = $smtpd_milters

Restart both processes:

sudo systemctl restart opendkim postfix