DKIM add header to sign

alebeta

Well-Known Member
Mar 20, 2018
45
3
48
34
gonkar.com
Hi all,

Am configuring an app to send emails and it is using PMG as its way out to the internet. all works great, at the moment I needed to add a couple of headers to my email, like:

  • List-Unsubscribe
  • List-Unsubscribe-Post
In order to be compliant with some marketing email best practices.

I had been following the RFC for this List implementation https://datatracker.ietf.org/doc/html/rfc8058#section-4

It mentions

The List-Unsubscribe and List-Unsubscribe-Post headers MUST be
covered by the signature and included in the "h=" tag of a valid
DKIM-Signature header field.

At the moment when I check the signed headers I can see:

h= cc:content-type:content-type:date:from:from:list-unsubscribe :message-id:mime-version:reply-to:subject:subject:to:to

It does include List-Unsubscribe, but it is missing List-Unsubscribe-Post.

Reading PMG documentation https://pmg.proxmox.com/pmg-docs/pmgconfig.1.html

I found that the header list is taken from Mail::DKIM::Signer.

It may be possible that Mail::DKIM:Signer is not having the header I need?

Is there a way I could add this header?

thanks in advance
 
The list of headers is currently hard-coded (and mostly taken from
Code:
Mail::DKIM::Signer
with a few headers added for oversigning)):
https://git.proxmox.com/?p=pmg-api....f1412477781dd8345da67dad0d02412d6;hb=HEAD#l92

Out of curiosity - do you actually run into a problem with your mails not being accepted due to this ?

In any case if you like you can open an enhancement request over at https://bugzilla.proxmox.com - there everybody who needs this can subscribe and we can see how many people would benefit from this - no promises if/when someone will pick it up though

I hope this helps!
 
Hi @Stoiko Ivanov

At the moment for email marketing, having this header signed helps to comply with the RFC and it helps to make it easier for subscribers to unsubscribe with one click function. Normally Gmail will show a unsubscribe button near the email address From field. And it will work similar in outlook.

That's why before I made reference to the RFC, I can imagine Gmail, Outlook and company are following this and it helps to go to inbox instead of spam.

As a reference from Gmail, you can visit this link https://support.google.com/mail/answer/81126?hl=en

On the other hand, for me it is very important to have it, I could perform the changes in the code and then push it to the repo. Would that be ok? or just the core team can perform pull requests? If it is not possible, then I can just follow the bugzilla path.

but I guess for a lot of users, this can be useful since it helps the delivery of email marketing.

All the best
 
That's why before I made reference to the RFC, I can imagine Gmail, Outlook and company are following this and it helps to go to inbox instead of spam.
That was my question - are they actually doing that - did you see a mail getting rejected because List-Unsubscribe-Post was not included in the signed headers? (But that was mostly my curiosity and not really related to whether we want to add header to be signed)

could perform the changes in the code and then push it to the repo. Would that be ok? or just the core team can perform pull requests?
External contributions to our projects are more than welcome - we do use a e-mail based workflow (thus not pull requests but signed-off patches sent to our development mailing lists - check out the wiki-page on developer documentation:
https://pmg.proxmox.com/wiki/index.php/Developer_Documentation

(one important part is that we'd need a CLA from you in order to be able to accept a contribution - https://pmg.proxmox.com/wiki/index.php/Developer_Documentation#Software_License_and_Copyright)

If you like I'll gladly review your patches for inclusion!
(else of course feel free to submit a request at bugzilla)

Thanks!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!