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

Multi Domain Support #3

Open
fleaz opened this issue Aug 25, 2022 · 4 comments
Open

Multi Domain Support #3

fleaz opened this issue Aug 25, 2022 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested

Comments

@fleaz
Copy link

fleaz commented Aug 25, 2022

Hey,

I started nearly the same project a few months ago, but only implemented Thunderbirds Autodiscover so far, so yours is already way more advanced than mine.

But one feature I implemented, which was also lacking from all the other already available tools I found was support for multiple domains. Most of the times a mailserver serves multiple domains and the fact that they use the same mailserver, results in the same config for all of them, therefore running a tool x times for every domain felt wrong to me and would massively increase the work when e.g. onboarding a new domain.

I did some research regarding the different mailconfig methods and came to the conclusion that hosting the tool once, on one domain and pointing all the other domains via one CNAME and a SRV to the "main domain" where the tool runs, should work. But maybe you have more knowledge about other methods that would not be compatible with this. I documented most of my findings and the way the DNS needs to be configured in the README of my project if you want to have a look.

Sadly I can't write any Rust so I'm not able to work on a PR for this, but if you could consider this feature I could stop working in parallel on my own tool and start using yours on multiple mailservers of mine :)

Best,
fleaz

@williamdes
Copy link
Member

Hey!

Just reading quickly this before sleeping, I will make an in depth response tomorrow

I did some research regarding the different mailconfig methods and came to the conclusion that hosting the tool once, on one domain and pointing all the other domains via one CNAME and a SRV to the "main domain" where the tool runs, should work.

That's exactly how this tool works, it assumes all domains are configured the same way and if not just add it to CUSTOM_DOMAINS to use the {imap,pop,smtp}.domain.tld syntax

So in short I run only one instance of this project.
Make CNAMEs to it. And make some domains use the custom syntax (I avoid it because it's painful to have a SSL certificate on the server having all the domain names in it). All the other domain names just use the configured mail server host names.

@williamdes williamdes added documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested labels Aug 25, 2022
@williamdes williamdes self-assigned this Aug 25, 2022
@williamdes
Copy link
Member

Hi back 👋🏻 ,

After a full re-reading I have come to the same conclusion as yesterday

I did some research regarding the different mailconfig methods and came to the conclusion that hosting the tool once, on one domain and pointing all the other domains via one CNAME and a SRV to the "main domain" where the tool runs, should work. But maybe you have more knowledge about other methods that would not be compatible with this. I documented most of my findings and the way the DNS needs to be configured in the README of my project if you want to have a look.

So, like I wrote: this is way I actually do in production. I have at least 5 domains pointing at it now.
It dynamically uses the base domain name from the URL. Let me know if this suits your needs.
I can adapt the code too

Sadly I can't write any Rust so I'm not able to work on a PR for this, but if you could consider this feature I could stop working in parallel on my own tool and start using yours on multiple mailservers of mine :)

No worries, I can write Rust, I am still learning but it's way easier now. Have a try ;)

@fleaz
Copy link
Author

fleaz commented Aug 29, 2022

Thanks for the reply. This sounds pretty awesome and like it would fit me need. :)
I will give it a go in the next days and report back.

@williamdes
Copy link
Member

Hi @fleaz
What do we have left to do in order to close this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants