Skip to content

v1.3.1 — Correct SPF domain and alignment for mail received by GMX

Latest

Choose a tag to compare

@shotacure shotacure released this 06 Nov 12:56

🐞 Fix: SPF domain shown as "-" and SPF alignment as "no" for mail received by GMX

For mail received by GMX, the SPF card showed PASS (domain: -) and SPF aligned: no, even when GMX reported spf=pass for the sender's own domain. When the SPF card was expanded, the local part of the envelope address also appeared as a bogus property (for example bounce.xxxx = 3Dyyyy@em.example.net).

GMX folds its Authentication-Results header right after smtp.mailfrom= and writes the address on the next line:

spf=pass smtp.mailfrom=
 bounce@em.example.net

RFC 8601 allows whitespace and line folding on both sides of =, but the add-on expected the value to follow = immediately, so the SPF domain was never read. Every property value is now read with optional whitespace around =: smtp.mailfrom, header.d, header.i, header.s, header.from, policy.dmarc, the IP properties, envelope-from / client-ip in Received-SPF, and the expanded card display.

Effect on the verdict: with the SPF alignment now read correctly, GMX-received mail that passes DMARC through both SPF and DKIM no longer gets the "Subject unsigned (DKIM replay risk)" warning. That check applies only when DKIM is the sole aligned method. A survey of about 98,000 messages from other providers showed no change in any verdict or displayed value.

Thanks again to @Unr3aL for another precise report. The folded header sample, the RFC 8601 grammar reference and the Node reproduction pinpointed the cause right away.


🐞 修正: GMX で受信したメールの SPF ドメインが「-」、SPF アライメントが「no」と表示される問題(日本語)

GMX で受信したメールでは、GMX が差出人自身のドメインで spf=pass を報告していても、SPF カードが PASS (domain: -)、SPF aligned: no と表示されていました。SPF カードを展開すると、エンベロープアドレスのローカル部が存在しないプロパティとして表示されることもありました(例: bounce.xxxx = 3Dyyyy@em.example.net)。

GMX は Authentication-Results ヘッダを smtp.mailfrom= の直後で折り返し、アドレスを次の行に書きます。RFC 8601 では = の前後に空白や折り返しを置けますが、アドオンは = の直後に値が続く形しか想定しておらず、SPF ドメインを読み取れていませんでした。smtp.mailfrom・header.d・header.i・header.s・header.from・policy.dmarc・IP 系のプロパティ、Received-SPF の envelope-from / client-ip、およびカードの展開表示で、= の前後の空白を許して値を読み取るようにしました。

判定への影響: SPF アライメントを正しく読めるようになったため、GMX で受信し、SPF と DKIM の両方で DMARC に合格しているメールには「件名が未署名(DKIM リプレイの余地)」の警告が出なくなります(この検査は DKIM だけでアラインしている場合に限るため)。他のプロバイダのメール約 98,000 通で調べたところ、判定や表示が変わったものはありませんでした。

今回も的確な報告を寄せてくださった @Unr3aL さんに感謝します。折り返されたヘッダのサンプル、RFC 8601 の文法の指摘、Node での再現のおかげで、原因をすぐに特定できました。