・opendkim.conf の設定

[root@alma]# vi /etc/opendkim.conf

≪ 途中省略 ≫

## Selects operating modes. Valid modes are s (sign) and v (verify). Default is v.
## Must be changed to s (sign only) or sv (sign and verify) in order to sign outgoing
## messages.
Mode v
※書き換え(送信時に署名、受信時に署名確認)
Mode sv

≪ 途中省略 ≫

## Create a socket through which your MTA can communicate.
#Socket inet:8891@localhost
※コメント解除(ポート指定)
Socket inet:8891@localhost
Socket local:/run/opendkim/opendkim.sock
※コメント化(ソケット通信解除)
#Socket local:/run/opendkim/opendkim.sock

≪ 途中省略 ≫

## Add a DKIM-Filter header field to messages passing through this filter
## to identify messages it has processed.
SoftwareHeader yes
※書き換え( OpenDKIM のバージョンを表示させない)
SoftwareHeader no

≪ 途中省略 ≫

## Gives the location of a private key to be used for signing ALL messages. This
## directive is ignored if KeyTable is enabled.
# KeyFile /etc/opendkim/keys/default.private
※コメント解除(鍵ファイルの場所指定)
KeyFile /etc/opendkim/keys/default.private ## Gives the location of a file mapping key names to signing keys. In simple terms,
## this tells OpenDKIM where to find your keys. If present, overrides any KeyFile
## directive in the configuration file. Requires SigningTable be enabled.
# KeyTable /etc/opendkim/KeyTable
※コメント解除(鍵テーブルの場所指定)
KeyTable /etc/opendkim/KeyTable

## Defines a table used to select one or more signatures to apply to a message based
## on the address found in the From: header field. In simple terms, this tells
## OpenDKIM how to use your keys. Requires KeyTable be enabled.
# SigningTable refile:/etc/opendkim/SigningTable
※コメント解除(署名テーブルの場所指定)
SigningTable refile:/etc/opendkim/SigningTable

## Identifies a set of "external" hosts that may send mail through the server as one
## of the signing domains without credentials as such.
# ExternalIgnoreList refile:/etc/opendkim/TrustedHosts
※コメント解除(認証を行わないメールサーバーを指定(自分自身))
ExternalIgnoreList refile:/etc/opendkim/TrustedHosts

## Identifies a set "internal" hosts whose mail should be signed rather than verified.
# InternalHosts refile:/etc/opendkim/TrustedHosts
※コメント解除(送信時に認証を行うメールサーバーを指定(自分自身))
InternalHosts refile:/etc/opendkim/TrustedHosts

≪ 以下省略 ≫