How to include Gmail’s Feedback-ID header in DKIM signature

Feedback-ID is an additional header required by Gmail Feedback Loop to see aggregated data in Google Postmaster tools. Gmail requires it to include in DKIM-Signature. The following guide explains how it can be configured in OpenDKIM :

Edit opendkim.conf

vim /etc/opendkim.conf

Add the following line :

SignHeaders Feedback-ID

Reload openkdim :

systemctl reload opendkim.service

Reload postfix :

systemctl reload postfix.service

Send a test email with swaks to gmail :

swaks --from [email protected] --to [email protected] --h-Feedback-ID 123:asd:123 --server 127.0.0.1:25

My test mail results :

Authentication-Results: mx.google.com;
dkim=pass [email protected] header.s=key1 header.b=oY1NVInb;
spf=pass (google.com: domain of [email protected] designates 45.55.57.182 as permitted sender) [email protected];
dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=postfix.io
Date: Sun, 12 Nov 2017 11:04:42 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=postfix.io; s=key1; t=1510484682;       
bh=ecGWgWCJeWxJFeM0urOVWP+KOlqqvsQYKOpYUP8nk7I=; h=From:Feedback-ID:From;     
b=oY1NVInbieJq4f6IWDjHVT25S5zvazNDtWuso2TYAEEa80kuh/KpR9Z2T+NxRuiV8
FODtj02rXnAUD1eaGFlzaUq7+HP/2teVi2lZo4DJYxr5eePOsY2GOIFpy35VtNAmBv
BL+lxdRiNDqbSwipwZDFMTja+SKk5+0eUOyqaDcg=
To: [email protected]
From: [email protected]
Subject: test Sun, 12 Nov 2017 11:04:42 +0000
Message-Id: <[email protected]>
X-Mailer: swaks v20170101.0 jetmore.org/john/code/swaks/
Feedback-ID: 123:asd:123

This is a test mailing

2 thoughts on “How to include Gmail’s Feedback-ID header in DKIM signature”

  1. Hej, jeg antager at du er dansk, siden du roder med tele.dk. Jeg har et hurtig postfix spørgsmål, som du måske har svaret på.

    Jeg vil gerne sende og signe mail fra et domæne, f.eks. onlineforum.dk, men sætte afsender navn og adresse til brugeren af forum’et. Det giver (måske) problemer af DKIM valideres ud fra afsenderen, og dermed bliver den ikke signet.

    Jeg har lavet følgende post, som desværre ikke har givet pote: https://serverfault.com/questions/894518/make-postfix-opendkim-sign-mail-from-all-domains.

    Pft!

    Mvh
    Niklas

Leave a Reply

Your email address will not be published. Required fields are marked *