Adding a DKIM List-Unsubscribe-Post entry in DKIM.cpp

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
ptruessel
New user
New user
Posts: 4
Joined: 2023-06-05 14:07

Adding a DKIM List-Unsubscribe-Post entry in DKIM.cpp

Post by ptruessel » 2023-06-05 20:27

Hi there. We have HMailServer installed on a Windows Server an we are running a newsletter tool with it. In order to get a CSA cert we need to add a DKIM entry called "List-Unsubscribe-Post". Unfortunately we have no experience on HMailServer scripting neighter compliling for a Windows Server. Does anybody have experience on how to get this entry into the DKIM.cpp and then running on our production server?

User avatar
RvdH
Senior user
Senior user
Posts: 3088
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: Adding a DKIM List-Unsubscribe-Post entry in DKIM.cpp

Post by RvdH » 2023-06-05 20:49

Not to be harsh, but you simply can not do that with scripting

For hMailServer to be CSA Complaint these headers have to be defined within hMailServer code in DKIM.cpp, unfortunately 5.6.x doesn't get functional updates anymore, only security updates like OpenSSL updates.
There is a 5.7.x ALPHA branch for 'enthousiasts/long time users' where functional updates sometimes are committed, but it is unlikely your hoster would choose to run a APLHA or a custom 5.6.x build on a production server.

hMailServer is basically abandonware, see: https://www.hmailserver.com/state
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
RvdH
Senior user
Senior user
Posts: 3088
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: Adding a DKIM List-Unsubscribe-Post entry in DKIM.cpp

Post by RvdH » 2023-06-06 07:02

https://certified-senders.org/wp-conten ... Update.pdf
CSA requires that you sign at least these header fields:
• X-CSA-Complaints
• List-Unsubscribe
• List-Unsubscribe-Post
• From
• To
CSA-compliance requires 2 additional headers to be included into the DKIM header tag list: X-CSA-Complaints & List-Unsubscribe-Post
https://github.com/hmailserver/hmailserver/pull/465
Return-Path: <ruud@otherdomain.nl>
Received: from mail.otherdomain.nl (mail.otherdomain.nl [xxx.xxx.xxx.xxx])
by mail.domain.nl with ESMTPS
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256)
; Mon, 5 Jun 2023 21:57:56 +0200
dkim-signature: v=1; a=rsa-sha256; d=otherdomain.nl; s=mail;
c=relaxed/relaxed; q=dns/txt; h=From:Subject:Date:Message-ID:To:MIME-Version:Content-Type:Content-Transfer-Encoding:List-Unsubscribe:List-Unsubscribe-Post:X-CSA-Complaints;
bh=C6f0ERxia1HU2XfNJ3Nz9Jiyn15y+vmr2Vo2t3FSAoY=;
b=hN1rCxw62BOjF3XumX8fQE8OrRTcJ70E2/n7wmxRE9EGS7BPrsVMcuvMUr6lnqubo/zOvCOQrsgUPlxlByoIaGSaV26+WqMUd1cnIsiHnmu6SKO58S0Kc6qwOV8uL0ErIDG4jdjfClIR/qt5XqFyK9xFY7kJt1JgwZWwWQFdq4w=
X-hMailServer-Envelope-From: ruud@otherdomain.nl
Received: from localhost (localhost [127.0.0.1])
by mail.otherdomain.nl with ESMTPA
; Mon, 5 Jun 2023 21:57:54 +0200
Message-ID: <27A56468-A084-4A6C-96D9-3ED14F4164DA@mail.otherdomain.nl>
List-Unsubscribe: <mailto:ruud@otherdomain.com>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
X-CSA-Complaints: ruud@otherdomain.com
MIME-Version: 1.0
From: ruud@otherdomain.nl
To: ruud@domain.nl
Date: 5 Jun 2023 21:57:54 +0200
Subject: SMTP Test account ruud@otherdomain.nl
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

palinka
Senior user
Senior user
Posts: 4349
Joined: 2017-09-12 17:57

Re: Adding a DKIM List-Unsubscribe-Post entry in DKIM.cpp

Post by palinka » 2023-06-06 08:15

Easy peasy.

User avatar
RvdH
Senior user
Senior user
Posts: 3088
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: Adding a DKIM List-Unsubscribe-Post entry in DKIM.cpp

Post by RvdH » 2023-06-06 10:40

palinka wrote:
2023-06-06 08:15
Easy peasy.
The fix itself is, but getting it in a "official" build is not, unfortunately...
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

Post Reply