There remains a quirk / bug in Virtualmin that requires in /etc/opendkim.conf the following to be set:
Socket inet:8891@localhost
#Socket local:/var/run/opendkim/opendkim.sock
You need to just transpose the # between the two lines. Bug occurs ion new installs of Ubuntu 18 LTS.
Also check if these are in /etc/postfix/main.cf:
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
Add them if they are not there. Be careful about the ports, the numbers might vary slightly for different installs of Virtualmin.