postal icon indicating copy to clipboard operation
postal copied to clipboard

Default DKIM identifier should be used instead of hardcoded 'postal'

Open ppadron opened this issue 7 years ago • 1 comments

Hi there,

When assembling the DKIM header for a message, Postal checks if the domain has DKIM records properly configured, and if not it will use the server defaults. However, the dkim_identifier is hardcoded instead of using the dns.dkim_identifier setting in postal.yml:

https://github.com/atech/postal/blob/ed7889a40e1d777f1d80821043562ab18b04766e/lib/postal/dkim_header.rb#L12

It seems that this line should be:

@dkim_identifier = Postal.config.dns.dkim_identifier

Is this correct? I can provide a patch, I just want to be sure this is the expected behavior.

ppadron avatar Aug 23 '18 20:08 ppadron

Judging by https://github.com/atech/postal/blob/ed7889a40e1d777f1d80821043562ab18b04766e/lib/postal/dkim_header.rb#L10, I'd say you are correct.

Presumably the default value is rarely changed in the config but your patch would be useful for completeness.

willpower232 avatar Aug 25 '18 08:08 willpower232

You're absolutely correct. Resolved by 87e9b3e3460c727d94f73d19368be0495799468c

catphish avatar Apr 06 '23 10:04 catphish