Submitted by arosolino on Thu, 04/26/2012 - 13:29
Hi,
I noticed that when a new virtual server is created these entries are made.
MX 5 mail.${DOM}.
mail.${DOM}. IN A IP
Above is just an example. My server actually uses custom mail servers, and there is no where to edit these directives. I can't use the option "Use only the records above" because each of my websites are assigned their own IP address and would have to make manual edits like I am now for the mail server.
I noticed this line in feature-dns.pl
&bind8::create_record($file, "mail.$withdot", undef,
"IN", "A", $ip);
&bind8::create_record($file, $withdot, undef,
"IN", "MX", "5 mail.$withdot");
If i could just define a custom IP for the mail server it would solve my problem. Let me know.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Thu, 04/26/2012 - 13:50 Comment #1
So do your domains have their mail hosted elsewhere? If so, you should turn off the "Accept mail for domain?" feature on the creation form - in this case, no
mail
orMX
records will be created.Submitted by arosolino on Thu, 04/26/2012 - 14:06 Comment #2
Well this server actually is my mail server and DNS server. So I use an external IP when I create it (an IP of another server where the web files are stored). But that IP is being set for the mail server.
Submitted by JamieCameron on Thu, 04/26/2012 - 15:59 Comment #3
Ok, so what you really want is for the www record to point to a different system, but the mail record to point to your Virtualmin system?
Submitted by arosolino on Fri, 04/27/2012 - 08:25 Comment #4
Yes that would work.
Submitted by JamieCameron on Fri, 04/27/2012 - 16:32 Comment #5
Ok, in that case you should go to System Settings -> Server Templates -> Default Settings -> BIND DNS Domain, and in the "Address records for new domains" field un-check www.domain and "Domain name".
Then in the "BIND DNS records for new domains" field enter :
www.${DOM}. IN A 1.2.3.4
${DOM}. IN A 1.2.3.4
Replacing 1.2.3.4 with the IP of your webserver.
When you create a domain, just use the default IP, which is the IP of your virtualmin system. This will be used in the
mail
record.Submitted by arosolino on Mon, 04/30/2012 - 09:26 Comment #6
I would do this but each of my websites are assigned to their own IP address. That would limit be to use the same IP for each website.
Submitted by JamieCameron on Mon, 04/30/2012 - 11:53 Comment #7
Are these all IPs on external systems
One fix may be to not add any records in the template, and then simply add the www record after the domain has been created.
Submitted by arosolino on Mon, 04/30/2012 - 13:43 Comment #8
What I am doing now is I just added another mail subdomain, and I delete the old one after I create the virtual server.
Just wanted to make sure there wasn't anything I was missing.
If I comment out this line: &bind8::create_record($file, "mail.$withdot", undef, "IN", "A", $ip);
Then all my problems are solved, but I will not do that for sake of updates.
Submitted by Issues on Mon, 05/14/2012 - 13:45 Comment #9
Automatically closed -- issue fixed for 2 weeks with no activity.