Commit c757eec4 authored by Jesse Norell's avatar Jesse Norell

myhostname placeholder needs to be regex

parent 709aed2c
......@@ -896,6 +896,8 @@ class installer_base {
}
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 @@ class installer_base {
'{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 @@ class installer_base {
$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 @@ class installer_base {
$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);
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment