I am hosting a server at Netcup Gmbh and that server has an identical name domain.
Virtualmin uses this domain when I log in as root.
I have created multiple users/domains with external DNS, with email addresses among them.
Everything is protected with SSL certificates.
Then about DKIM.
Virtualmin provides a private and public key that is valid for the root domain and the underlying domains, at least thatās what I read in Virtualminās screen.
Now I use the public key in the DNS of the domains that I have all hosted externally, except for the main domain.
You may already have sensed it coming: The DKIM key in the sent e-mail is a completely different one and it is rejected. This is because the DNS contains the DKIM key created from the main domain.
Example of a domain where DKIM goes wrong: karimari.nl
My question is: How can I handle the main server domain / How do I make sure that the created key in Virtualmin is correct?
I hope You can help me with this issue, I canāt find it in internet sources.
Thank you for your contribution.
In Virtualmin, I searched for the serverās DNS recorders. Those are at the DNS host.
From there, I copied the _domainkey TXT-record to the domain whose email I am testing and voila, it works WELL now!!!.
That confusion is at an end.
The mail server now sends āvserver.localdomainā as the server name in the header.
Do you perhaps also know where I can change the hostname in an Almalinux 9.1 system with postfix?
Found the solution also for āhe mail server now sends āvserver.localdomainā as the server name in the header.ā:
in directory /etc/postfix is the configuration file main.cf
In the section # INTERNET HOST AND DOMAIN NAMES we can add the hostname we like to use in the e-mail header of the sent mail.
After adding an existing one in the DNS where the servername is mentioned, the right servername will be there.