DKIM - Should there be 2 domains in this box

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.3
Webmin version 2.101
Usermin version 2.001
Virtualmin version 7.8.2
Theme version 21.04
Package updates 70 package updates are available

When I enable DKIM there are 2 domains in the Extra domains to sign for, but should it not just be the FQDN of server.example.com and the following option makes no difference

virtualmin → System Settings → Virtualmin server configuration → configuration category: SSL settings → Create host default domain with Let’s Encrypt certificate

NB: server.example.com is my servers hostname.

This might be a newbie question, but I am trying :smile:

thanks as ever

What do think should appear there ?

one, just the FQDN (server.example.com)

you’ve not taken into account that server is the first part of the FQDN. Why not just delete it & see if anything fails, TBF I never even bother looking at this options as it just works, but I would guess the developers would not add something if it was required at one point in time. It may now be redundant, but who really cares ? As with all Virtualmin stuff it just works with no interaction from the end user and should be just left alone

you are confused I think :smile: As ssl certs and Lets Encrypt have nothing to do with DKIM :smile:

Best practice (someone should correct me if I’m wrong) is for the host default domain (the name of the actual server??) to NOT be used for any email or websites – create Virtualmin virtual servers for each domain you wish to support on the server.

or — I am the one confused here :smile: :smile:

1 Like

@verne You are correct.

my understanding is that you should not use your server hostname to send emails, Joe has mentioned this several times but there is a debate as to whether this is possible now, but currently the advice is not to.

In the above picture there are 2 issues after thinking about it:

  • server.example.com = should not be used for sending email so should not have a DKIM entry.
  • web = is effectively a TLD and not a domain name so this is actually an invalid entry.

I will report these in the morning.

I’ve stated something that sounds kinda like this many times, but not this.

I have said, and continue to say: You should not name your server the same as a domain name you will be hosting mail for in Virtualmin (or otherwise virtually hosting mail for). It has some of the same words, but it’s roughly the opposite direction (receive vs. send) of what you’re saying.

Your server hostname probably will be somewhere in the mails you send, and it’s supposed to be. It’s how the server identifies itself to other servers.

Edit: The key word here is virtually or virtual. Anything in the virtual map (which is what Virtualmin is managing when you create email domains) should not be the same as the name of the server.

Edit2: I feel like I should explain why this is, so maybe it makes more sense. The virtual map tells Postfix, “Mail for this domain can be relayed to this server”…basically mapping mail @domain.tld to a user @ the hostname of the server. But, if the name of the server is domain.tld and you have @domain.tld in virtual, you are saying, “accept mail for @domain.tld and forward it to @domain.tld”. Now, does that make sense?

2 Likes

@joe what are your thoughts on the DKIM module, by default, adding the 2 domains as above into Extra domains to sign for

  • I ask this because I don’t think they should be there as you should not be sending emails from your hostname, so they appear to be pointless (specific reasons for each domain also above)
  • On a related note, there are some tests that now look for a SPF record on the HELO domain (usually the rDNS/hostname) of your server. What are your thoughts?

https://dkimvalidator.com/

image

NB: I will add your explanation about not using the hostname for sending emails to my notes.

The server entry is bogus. That doesn’t make sense.

thats what i thought, these are created by virtualmin so do you think I should report this as a bug?

Also should server.example.com be removed, because I should not be sending email from the hostname.

I have reported this isse: DKIM - Should there be 2 domains in this box · Issue #718 · virtualmin/virtualmin-gpl · GitHub

  • server.example.com = used by Webmin to send emails.
  • server = not a valid domain so should definitely be removed.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.