How to configure OmitHeaders in DKIM ( /etc/opendkim.conf)

I use Nethserver for a couple of years ago, And I use DMARC, SPF and DKIM. I think that the user interface is pretty nice to do in a simple way those configurations. Great!! But sometimes you need something more specific.

In my case I need to avoid sign the Subject of my messages.
I can do that using in /etc/opendkim.conf the parameter

OmitHeaders Subject

and it works.
But as the file states at the beggining, that file is overwrite sometimes.

When I had to configure other files I use /etc/e-smith/templates/etc/… and I know that the changes are properly deployed.

But in this case I don’t have a default /etc/e-smith/templates/etc/opendkim/opendkim.conf to change so I have doubts about the right file where I have to add the line.

OmitHeaders Subject

I created a file /etc/e-smith/templates/etc/opendkim/opendkim.conf with only that line and the system doesn’t add it to /etc/opendkim.conf

Any suggestion?

Thanks a lot
Best regards

Your template is for /etc/opendkim/opendkim.conf, not for /etc/opendkim.conf. Fix the path of your template and you should be good.

1 Like

Thank you very much. The fastest and better support that I have seen. Congratulations and many many thanks. Sorry my typo.

If it works for you, can you mark this topic as solved, please?

Fragments in /etc/e-smith/templates should not be modified because they could be updated by Nethesis for some reason.

so, create a new fragment in /etc/e-smith/templates-custom/etc/opendkim.conf

mkdir -p /etc/e-smith/templates-custom/etc/opendkim.conf
cd /etc/e-smith/templates-custom/etc/opendkim.conf

Then create a new file 20base

vi 20base

And add these lines inside it

# custom 20base
# blahblahblah some description of this parameter

OmitHeaders Subject

Then type these commands

expand-template /etc/opendkim.conf
signal-event nethserver-mail-server-update
signal-event nethserver-mail-server-save