Hello together,

my normal mails to something@example.com are managed by a provider.
I want to create a mailcow server that takes care of mails for something@mail.example.com. Mainly for testing purposes. But the hostname for the server should be - for obvious reasons - mail.example.com.
When I install the server and want to add the domain mail.example.com in the admin interface under “E-Mail - Configuration - Add domain”, I get the error message “Domain cannot match hostname”. Any other domain works.
Now I can just accept this and come up with another hostname. But I would like to understand why this is not possible. Is this an internal mailcow “problem”, or something fundamental that doesn’t work with mail?

I found the corresponding place in the code:
GitHub Icon GitHub Code


Unfortunately, there is no comment indicating what the problem is.
There is an issue that deals with it, but also only speculates what the reason could be:
GitHub Icon GitHub Issue
GitHub Icon GitHub
[question] Adding domain name same as mailcow domain · Issue #2106 · mailcow/mailcow-dockerized
I have installed mailcow using the domain mail.test.domain.tld. now I want to add that same domain on the add domain page in the mailcow UI and im getting an error. Is this not possible? I have con...
I have installed mailcow using the domain mail.test.domain.tld. now I want to add that same domain on the add domain page in the mailcow UI and im getting an error. Is this not possible? I have con...

I have commented out lines 567-574 on a test basis and have not found any limitations so far.

I will run this for a bit and possibly make a pull request.
I am still open for explanations. Maybe I do something stupid or wrong.

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

No one is typing