LoginSignup
0
0

OpenDKIMでList-Unsubscribe-Postヘッダーを署名対象ヘッダにする

Posted at

RFC8058 に対応するためには、List-Unsubscribe ヘッダと List-Unsubscribe-Post ヘッダを署名対象ヘッダにしないといけないとのこと。
しかし、OpenDKIM のデフォルト設定ではList-Unsubscribe-Postが署名対象ヘッダにならないので、設定を行った。

設定

opendkim.conf に SignHeaders 設定を追加

opendkim.conf
SignHeaders *,+List-Unsubscribe-Post,+List-Unsubscribe

(+List-Unsubscribe はなくても同じ。明示のために記述)

参考ヘルプ

失敗設定

opendkim.conf
SignHeaders List-Unsubscribe-Post,List-Unsubscribe

SignHeaders の上記参考ヘルプには下記のように「DKIM仕様の必須ヘッダは、省略していても含まれる」と書かれているが、実際に試すと 何かのヘッダが足らないらしく Gmail でDKIM=FAIL となる場合があったので、上記の * と + を使った記述で設定している。

SignHeaders (dataset)
Specifies the set of header fields that should be included when generating signatures. If the list omits any header field that is mandated by the DKIM specification, those fields are implicitly added. By default, those fields listed in the DKIM specification as "SHOULD" be signed (RFC6376, Section 5.4) will be signed by the filter. See the OmitHeaders configuration option for more information about the format and interpretation of this field.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0