Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow import of DKIM-keys (with a warning that it is not from DNS) #421

Open
JustMyGithub opened this issue Jan 4, 2024 · 5 comments
Open

Comments

@JustMyGithub
Copy link

Providers may change the selector and remove the old selectors public key from DNS, a few years ago I noticed that for gmail. It would be nice it it was possible to import keys to DKIM verifier in such a case, but there should be a warning that it was provided by the user.
(Yes, I am aware that DNS can be faked as well, but that is not as easy as importing a key.)

btw: It would also be nice to have a trustworthy archive for (retired) DKIM keys, but that another thing.

@dodmi
Copy link
Contributor

dodmi commented Jan 5, 2024

DKIM verifier already has a feature to save DKIM public keys.

I don't know, how it's looking in the current branch, this is from the old 2.x branch. I doubt, that it was removed:
image

Where would you get the key to import, when it's already removed from DNS?
I guess, DKIM verifier does already everything you request.

The only thing, which could be changed, is the way, the case is handled, when the public key for a selector is changed. As there's only one key per selector in the cache, you need to update the DKIM key to verify new mails. Verification for any old mail will fail afterwards and the old key is lost.

@JustMyGithub
Copy link
Author

I think your screenshot shows settings for caching, not for importing. It is an internal storage of the key within Thunderbird, not the user (or an import file) providing information.

Where would you get the key to import, when it's already removed from DNS? I guess, DKIM verifier does already everything you request.

You may find it on a some website or research paper for example. That indeed did happen, it is not as unlikely as it may seem at first glance.

Furthermore it could be obtained from an old instance of DKIM verifier that has this key cached.

@dodmi
Copy link
Contributor

dodmi commented Jan 6, 2024

Yes, the dialog is for (permanent) caching, not for importing. But for your personal e-mails, the key would be in the cache. So, verification will work after it's removed from DNS if you configure caching. And, this is also your personal trustworthy archive.

What's not working is the case, that a key is replaced in DNS with the same selector.

@lieser
Copy link
Owner

lieser commented Jan 6, 2024

The caching feature dodmi mentioned can be I think uses as a workaround for most of what you want.

  1. Enable caching of DKIM keys,
  2. View a DKIM signed message to cache at least one key.
  3. Edit one of the existing cached keys to the one you want to import.

Yes not a nice workflow. But I successfully use it for e.g. importing the DKIM key for the example inside the RFC.

A way to directly add a new key to the cached ones would be of course better, but I currently don't see enough use for most users for it to have a high priority for me.

but there should be a warning that it was provided by the user.

What is your use case for wanting such a warning?
I currently don't see a use case for wanting to long term import a not trusted key. So even if importing would come, it would probably be handled like all other cached keys.

@lieser
Copy link
Owner

lieser commented Jan 8, 2024

A note about adding a warning for imported keys.
It is already possible to get a warning for it by marking the key as being in testing mode (i.e. adding ; t=y), and enabling verification of domains in testing mode in the advanced options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants