
在 Ubuntu 20.04 VPS 上,
sudo apt install opendkim opendkim-tools
按照預期透過安裝 opendkim此處提供的步驟。
然而,經過測試,雖然電子郵件實際上以非常低的垃圾郵件分數 (3.9) 發送到目標郵箱,因此滲透到垃圾郵件過濾之外,
sudo opendkim-testkey -d domain.tld -s default -vvv
回傳意想不到且有些矛盾的結論:
opendkim-testkey: key not secure
opendkim-testkey: key OK
密鑰可以,但不安全。這讓人對「OK」位元產生懷疑。必須採取什麼措施才能確保金鑰安全?
更新
根據評論中的建議,內容opendkin.conf
如下:
Syslog yes
Logwhy yes
UMask 007
Canonicalization relaxed/simple
Mode sv
SubDomains no
AutoRestart yes
AutoRestartRate 10/1M
Background yes
DNSTimeout 5
SignatureAlgorithm rsa-sha256
Socket local:/run/opendkim/opendkim.sock
PidFile /run/opendkim/opendkim.pid
OversignHeaders From
TrustAnchorFile /usr/share/dns/root.key
include
UserID opendkim
KeyTable refile:/etc/opendkim/key.table
SigningTable refile:/etc/opendkim/signing.table
ExternalIgnoreList /etc/opendkim/trusted.hosts
InternalHosts /etc/opendkim/trusted.hosts