Jump to content
Froxlor Forum
  • 0
Sign in to follow this  
ZARk

DNS Patch Proposition

Question

Hello

 

I have a multiple ip setup.

 

basically all http is on one ip, and the mail system on another (same server, just different ip).

 

This  basically allows for a correct reverse ip for the mail server.

 

I've setup roundcube on the same ip as the smtpd.

 

.15  =  apache for vhosts

.16 = apache for roundcube + smtpd

 

 

Now, the problem i have, is that froxlor will create a "mail." alias in the zonefile BUT always point it to the main ip.

 

The proposition i have, and patched myself is this :

 

cron_tasks.inc.dns.10.bind.php

$zonefile .= '$INCLUDE /etc/bind/froxlor_extra.inc.zone'."\n";
You need to create a file (that can be empty) .
Inside you can just put lines that should be included in ALL zonefiles created.
 
in my case, i add a "mail" alias pointing to my second ip. and TADA !
also, i can add custom spf and other things.
(also, i disable in the settings the generation of the mail alias, so i can do it manually)
 
 
I feel this is needed in froxlor, as to add custom configuration as now all files are generated from the scripts.
This is a fast hack, but could be made more flexible by adding a field in the configuration panel that would fill the file, remove the include if its empty etc... I leave that to the devs if they feel like it :)
 
 
take care

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

 

Hello

 

I have a multiple ip setup.

 

basically all http is on one ip, and the mail system on another (same server, just different ip).

 

This  basically allows for a correct reverse ip for the mail server.

 

I've setup roundcube on the same ip as the smtpd.

 

.15  =  apache for vhosts

.16 = apache for roundcube + smtpd

 

 

Now, the problem i have, is that froxlor will create a "mail." alias in the zonefile BUT always point it to the main ip.

 

The proposition i have, and patched myself is this :

 

cron_tasks.inc.dns.10.bind.php

$zonefile .= '$INCLUDE /etc/bind/froxlor_extra.inc.zone'."\n";
You need to create a file (that can be empty) .
Inside you can just put lines that should be included in ALL zonefiles created.
 
in my case, i add a "mail" alias pointing to my second ip. and TADA !
also, i can add custom spf and other things.
(also, i disable in the settings the generation of the mail alias, so i can do it manually)
 
 
I feel this is needed in froxlor, as to add custom configuration as now all files are generated from the scripts.
This is a fast hack, but could be made more flexible by adding a field in the configuration panel that would fill the file, remove the include if its empty etc... I leave that to the devs if they feel like it :)
 
 
take care

 

 

hello! that was a lot of information. i am really into http and ip and i would really like to make it perfectly. what you posted is really something really helpful.

Share this post


Link to post
Share on other sites
  • 0

Sorry this is an old thread.

But an update for those who use this.

With newer froxlor, the "patch" to make is :

/lib/functions/dns/function.createDomainZone.php

At the bottom of the createDomainZone function, just before 

$zone = new DnsZone((int) Settings::Get('system.defaultttl'), $domain['domain'], $domain['bindserial'], $zonerecords);

Add : 

$zonerecords[] =  '$INCLUDE /etc/bind/froxlor_extra.inc.zone'."\n";

 

Just a summary, this adds an include file for all your domains. quick hack if you have multiple ip's like me, or want to add some fields for all the domains.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  



×