-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
DKIM generated key do not use HOSTNAME env var #1291
Comments
Actually I think this is working as designed (though it wasn't my design). All the documentation I have seen says that mail will be used; as far as I can tell host name is never mentioned? |
For me, the ./setup.sh script must be adapted. The doc say that setup.sh create dkim keys, This is not always correct and confusing... |
I'm afraid I don't follow. From the docs:
It says |
In the container, file /usr/local/bin/generate-dkim-config contain the line : It is not difficult to put a variable instead of --selector=mail to get the HOSTNAME and all would be fine... |
No it would not be difficult, but we are talking in circles. You say that it is wrong because it is A instead of B but the documentation says that it should be A. All the documentation I can find in this project agrees that the selector argument should be "mail", so it is not an error that it actually is "mail" and not host name. It is not unexpected or confusing, it is working as designed and documented. Please find where in the docker-mailserver documentation it says that selector should be host name and not mail if I have missed it. I don't think I have, though. |
I read the doc... I understood that this container could be parameterized... And I understood that the env var HOSTNAME is for this purpose... OK, all the doc speak about a hostname equal to mail. But it is not say that we MUST use mail to let this project work. If you choose another domain, it will not work out of the box. Because the dkim check won't be ok !! Check the outgoing email with the validator of your choice, you will see... So for me it is a bug. If you do not want to make the change, add in the doc that hostname MUST be mail. Thank you for your work and excuse my bad english (I'm just a poor little frechy ;) Regard, |
It is not a bug, it is working as designed and the host name does not have to be mail. The DKIM selector is mail. Not the host name. The host name can be anything. It does not have to be the same as the DKIM selector. And it works quite well when you have several domains. I have several domains and I know others using docker-mailserver that also have several domains. Each domain gets its own DKIM record. You need to generate one per domain, so config/opendkim/keys/domain.tld/mail.txt and config/opendkim/keys/second-domain.tld/mail.txt and so on. The DKIM selector is an arbitrary string representing a service. In this case the "mail" service. It is not a host name. I hope that cleared things up? I really don't think there is anything wrong here, I think you have misunderstood the documentation. This image has 20M docker pulls, so someone should have noticed if the basic installation instructions were totally wrong :-). |
OK I understand. Your choice is to force the DKIM selector with the value "mail". For my part, I deployed this docker image to create a second mail server. The first was mail.domain.tld and the new mail2.domain.tld. Last thing if I can... In the section Get the tool of the doc, you should add
Because Regards, |
Well, I'm the new kid on the block here so it wasn't my decision, but that is the design. Personally I've just copied the DKIM keys to all my servers within a domain, not sure if that is good or bad but it works. Good point about the documentation. |
Could you please tag this topic as "Evolution" to ask a new env var for the DKIM Section ? It is nothing to do and it could be so usefull ;) Thank you |
I created #1304 for that. The feature has been requested before. |
Context
Fill .env file whith for example HOSTNAME=test
Then, run ./setup.sh config dkim
Expected Behavior
2 files config/opendkim/keys/domain.tld/test.txt and config/opendkim/keys/domain.tld/test.private
Actual Behavior
"mail" is used instead of HOSTNAME
2 files config/opendkim/keys/domain.tld/mail.txt and config/opendkim/keys/domain.tld/mail.private are created
The text was updated successfully, but these errors were encountered: