Is it possible to use conditions for signing outgoing messages with OpenDKIM?

It should only sign outgoing messages if the selector exists in DNS.

  • I think it would be better to explain why you want to do this. Normally, OpenDKIM should sign emails for your own domains, as you define them in the SigningTable. So, of course, if you implement DKIM, those domains will definitely have selectors. – Tony Mar 15 at 9:48
  • @Tony I have about 800 domains I need to enable DKIM on, but I do not control DNS for all of them. – William Edwards Mar 15 at 11:18
  • You could write a script that creates the SigningTable after validating the DNS records. There's no point in checking this for every message separately. – Esa Jokinen Mar 15 at 18:30
  • @EsaJokinen That's a good idea and would be efficient. Thanks. – William Edwards Mar 25 at 8:28

I ended up writing a Python script to determine if domains have the DKIM key added to their DNS, and add them to the OpenDKIM SigningTable if so.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.