Jesse Norell
2016-02-03 c757eec4417aab69d2733916cc769c23b62a1fc7
myhostname placeholder needs to be regex
2 files modified
10 ■■■■■ changed files
install/lib/installer_base.lib.php 8 ●●●●● patch | view | raw | blame | history
install/tpl/helo_access.master 2 ●●● patch | view | raw | blame | history
install/lib/installer_base.lib.php
@@ -896,6 +896,8 @@
        }
        unset($server_ini_array);
        
        $tmp = str_replace('.','\.',$conf['hostname']);
        $postconf_placeholders = array('{config_dir}' => $config_dir,
            '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
            '{vmail_userid}' => $cf['vmail_userid'],
@@ -903,7 +905,7 @@
            '{rbl_list}' => $rbl_list,
            '{greylisting}' => $greylisting,
            '{reject_slm}' => $reject_sender_login_mismatch,
            '{myhostname}' => $conf['hostname'],
            '{myhostname}' => $tmp,
        );
        $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_postfix.conf.master', 'tpl/debian_postfix.conf.master');
@@ -938,8 +940,8 @@
        $configfile = 'helo_access';
        if(is_file($config_dir.'/'.$configfile)) {
            copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
            chmod($config_dir.'/'.$configfile.'~', 0400);
        }
        chmod($config_dir.'/'.$configfile.'~', 0400);
        $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
        $content = strtr($content, $postconf_placeholders);
        # todo: look up this server's ip addrs and loop through each
@@ -949,8 +951,8 @@
        $configfile = 'blacklist_helo';
        if(is_file($config_dir.'/'.$configfile)) {
            copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
            chmod($config_dir.'/'.$configfile.'~', 0400);
        }
        chmod($config_dir.'/'.$configfile.'~', 0400);
        $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
        $content = strtr($content, $postconf_placeholders);
        wf($config_dir.'/'.$configfile, $content);
install/tpl/helo_access.master
@@ -2,7 +2,7 @@
# be sure to list your own hostname(s), domain(s) and IP address(es) here
# Reject others identifying with this machine's hostnames and IP addresses
{myhostname}  REJECT
/^{myhostname}$/  REJECT
#/^((smtp|mx|mail)\.domain1\.com$/    REJECT
#/^mail\.domain2\.com$/        REJECT