Mail-Autoconfig per domain

Hello,

as described in the related issue there are cases where some constellations break a server. One of this constellations is with having Mail-autoconfig enabled globally but also having some domains on the server, where this configuration was overwritten in the Bind server (to point to an ExChange server instead of A or AAAA records on the virtualmin server). Everything works like a charm untill "re-check configuration" is clicked. Not only the Bind config but also the apache config is resetted to default in that point (at least apache is NOT crashing like Bind after these changes).

The whole problem could be solved with per-domain-autoconfig. DKIM can be per-domain. BCC, ProFTPd, Mail, Virus-Checking, everything can be per-domain.

Why not autoconfig-settings? It can not be THAT hard to code this per-domain, can it? ;)

This request is in addition of "Re-Check Configuration kills server (40508)", it does NOT mean if Mail-Autoconfig is per-domain virtualmin continues to rewrite config files 'at will' when clicking on check.

Thanks in advance, viebrock

Status: 
Closed (fixed)

Comments

The "re-check configuration" link shouldn't change any DNS records - just validate existing settings.

What record did you add or change specifically to get a custom per-domain autoconfig setup?

Hello,

for this case I use custom fields and all zones are created as dynamic zone for easier configuration between all servers and services. When the magic custom field has an entry all A and AAAA records for all autoconfig.domain and autodiscover.domain are deleted by nsupdate. In the same step CNAME's for autodiscover.domain and autoconfig.domain to the exchange domain are created. Everything fine, works like a charm for weeks no matter what changes on the virtual server. The moment I run the recheck configuration this script started announcing me that everything is ok and ready to use virtualmin. Two lines below teh error that Bind could not be started.

zone file selection BEFOR recheck configuration: [...] $ORIGIN _tcp.3s-ddns.de. _autodiscover SRV 0 1 443 autodiscover.homeserver-kp.de. _imap SRV 0 0 0 . _pop3 SRV 0 0 0 . $ORIGIN 3s-ddns.de. autoconfig CNAME autoconfig.homeserver-kp.de. autodiscover CNAME autodiscover.homeserver-kp.de. www A 138.201.23.222 AAAA 2a01:4f8:171:231d::2:6

everything OK. AFTER the recheck file contant looks something like: [...] $ORIGIN _tcp.3s-ddns.de. _autodiscover SRV 0 1 443 autodiscover.homeserver-kp.de. _imap SRV 0 0 0 . _pop3 SRV 0 0 0 . $ORIGIN 3s-ddns.de. autoconfig CNAME autoconfig.homeserver-kp.de. autodiscover CNAME autodiscover.homeserver-kp.de. www A 138.201.23.222 AAAA 2a01:4f8:171:231d::2:6 autodiscover A 138.201.23.222 AAAA 2a01:4f8:171:231d::2:6

So Bind of course refuses to start (zone xyz, CNAME and other data), one name cannot have an A or AAAA and a CNAME-Record. To me there seems to be no check if "autodiscover.domain" is already set in the zone even as CNAME or whatever Removing the last lines edited by the recheck resolves the problem but should not be necessary, the script just should not add these lines in case autodiscover.domain ... are already set in the zone.

I first thought it must be something else, too. But it is reproduceable as often as you want to, can be shown in real time. Watching the zone-files: everything fine, for weeks, month - restarting the bind or the whole server or not, adding, deleting virtual servers or not clicking on recheck configuration - waiting for the error massage Bind could not restart - immediately found that wrong lines in zonefiles

I walked three times throw this procedure to be sure it is REALLY the recheck and not something else. I cannot see anything else expect that recheck

Thanks in advance, viebrock

Oh, I see ... you created custom CNAME records that virtualmin is messing with.

I will fix this in the next Virtualmin release.

Status: Active ยป Fixed

You are the hero of my day. Thank you very much.

When is next release? Just updated wbm-virtual-server to 5.0.2 a hour ago.

viebrock

Releases normally come out every month or two, but we need to push out a new version soon to fix some Ubuntu 16.04 issues. So that should be going out in the next few days.

then you are many heroes in one. Thank you very much.