Just change your listener load priority order. See https://github.com/i-MSCP/imsc…er-file-naming-convention
Bad idea, 10_named_override_default_ns_rr.pl would delete my just set entries.
Just change your listener load priority order. See https://github.com/i-MSCP/imsc…er-file-naming-convention
Bad idea, 10_named_override_default_ns_rr.pl would delete my just set entries.
In that case, you shouldn't use the contrib/Listeners/Named/10_named_override_default_ns_rr.pl listener anyway because that listener still add the glue records in all zones which means out of zone data...
Best would be to use your own listener implementing all parts:
Listen on the beforeNamedAddDmnDb instead of the afterNamedAddDmnDb and then:
If you code that listener, we could push it and remove the contrib/Listeners/Named/10_named_override_default_ns_rr.pl listener file.
If you don't, I'll code it.
I'm ending with a listener file such as 10_global_ns.pl
Be aware that I've not tested it. it was fully written without any test other than those made in my head.
Edit: New pastbin link (typo issues)
Edit: Again a new pastbin link (typo issues)
Edit: Again a new pastbin link (typo issues)
Edit: Again a new new pastbin link ($ORIGIN must not be used for NS entries)
Edit: Again a new pastbin link (typo issues)
Edit: Replaced pastbin link by gist
Edit: The listener is now available in the 1.3.x branch (see below).
Dear @Nuxwin, great effort and faster than me. However, I have some points where I doubt, that it will work as intended:
1) Line 36: I guess, it should be an array definition with equal instead of an arrow
2) Line 70: $nsNumber should start with 1, there should not be an ns0. However, I would make it configurable, if people want to start with e.g. ns3
3) Line 69: the for $ipAddrType is run twice and will add each ns two times in $nsRecordEntries
4) The namespace is actually named instead of bind9
I did not had the time to fix the third flaw.
I'll test it anyway if you have no time this evening.
I've tested and it works
My listener config for that test:
Here, $ZONE_NAME is the value of BASE_SERVER_VHOST (panel host).
Result after creating a new customer account (here testme.com)
And for the panel zone
The new listener that allows to set identical NS entries in all zones has been pushed in our repository (1.3.x branch). See https://github.com/i-MSCP/imsc…2f2ab2782b9e9dfdb0cd62625
Be aware that this listener file is only compatible with i-MSCP Serie 1.3.x (version >= 1.3.8 which has not been released yet).
Since the last shoot, the listener has been improved a bit to allow arbitrary NS names. This is mostly needed when you use slave DNS servers that are out of your hands, such as the slave DNS servers of your registrar.
I appreciated all your efforts and also your patience to help us to improve i-MSCP. That is much appreciated.
Thank you.
Hey @Nuxwin, first of all, I need to thank you, having the patience to explain me, how the listeners work (I can use this to work on plugins whenever I find the time) and secondly about your impatience to do my part of the work.
Great work. And for sure, I help improving (or at least complaining about bugs), since I use the software and open source should work like this!
Edit: @Nuxwin, which changes make them only work with i-MSCP 1.3.x? I would like to run it on my current 1.3.7 already and therefore modify it. Thanks!
and secondly about your impatience to do my part of the work.
which changes make them only work with i-MSCP 1.3.x? I would like to run it on my current 1.3.7 already and therefore modify it.
I've changed the db.tpl template file to allow arbitrary NS names. The ns prefix is no longer hardcoded in the template file. I'll provide you with a version compatible with i-MSCP 1.3.7 but be aware that ns names will be fixed because the ns prefix is hardcoded in the db.tpl file. Give me some minutes.