Skip to content

Commit 9e63ffc

Browse files
author
Marius Burkard
committed
Merge branch 'master' into 'stable-3.1'
Master See merge request !338
2 parents 0ebe619 + 616ad0b commit 9e63ffc

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,27 @@ function configure_postfix($options = '')
185185
if(!is_file('/var/lib/mailman/data/transport-mailman')) touch('/var/lib/mailman/data/transport-mailman');
186186
exec('/usr/sbin/postmap /var/lib/mailman/data/transport-mailman');
187187

188+
//* Create auxillary postfix conf files
189+
$configfile = 'helo_access';
190+
if(is_file($config_dir.'/'.$configfile)) {
191+
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
192+
chmod($config_dir.'/'.$configfile.'~', 0400);
193+
}
194+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
195+
$content = strtr($content, $postconf_placeholders);
196+
# todo: look up this server's ip addrs and loop through each
197+
# todo: look up domains hosted on this server and loop through each
198+
wf($config_dir.'/'.$configfile, $content);
199+
200+
$configfile = 'blacklist_helo';
201+
if(is_file($config_dir.'/'.$configfile)) {
202+
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
203+
chmod($config_dir.'/'.$configfile.'~', 0400);
204+
}
205+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
206+
$content = strtr($content, $postconf_placeholders);
207+
wf($config_dir.'/'.$configfile, $content);
208+
188209
//* Make a backup copy of the main.cf file
189210
copy($config_dir.'/main.cf', $config_dir.'/main.cf~');
190211

install/dist/lib/gentoo.lib.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,26 @@ public function configure_postfix($options = '')
135135
touch($config_dir.'/nested_header_checks');
136136
touch($config_dir.'/body_checks');
137137

138+
//* Create auxillary postfix conf files
139+
$configfile = 'helo_access';
140+
if(is_file($config_dir.'/'.$configfile)) {
141+
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
142+
chmod($config_dir.'/'.$configfile.'~', 0400);
143+
}
144+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
145+
$content = strtr($content, $postconf_placeholders);
146+
# todo: look up this server's ip addrs and loop through each
147+
# todo: look up domains hosted on this server and loop through each
148+
wf($config_dir.'/'.$configfile, $content);
149+
150+
$configfile = 'blacklist_helo';
151+
if(is_file($config_dir.'/'.$configfile)) {
152+
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
153+
chmod($config_dir.'/'.$configfile.'~', 0400);
154+
}
155+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
156+
$content = strtr($content, $postconf_placeholders);
157+
wf($config_dir.'/'.$configfile, $content);
138158

139159
//* Make a backup copy of the main.cf file
140160
copy($config_dir.'/main.cf', $config_dir.'/main.cf~');

install/dist/lib/opensuse.lib.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,27 @@ function configure_postfix($options = '')
197197
if(!is_file('/var/lib/mailman/data/transport-mailman')) touch('/var/lib/mailman/data/transport-mailman');
198198
exec('/usr/sbin/postmap /var/lib/mailman/data/transport-mailman');
199199

200+
//* Create auxillary postfix conf files
201+
$configfile = 'helo_access';
202+
if(is_file($config_dir.'/'.$configfile)) {
203+
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
204+
chmod($config_dir.'/'.$configfile.'~', 0400);
205+
}
206+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
207+
$content = strtr($content, $postconf_placeholders);
208+
# todo: look up this server's ip addrs and loop through each
209+
# todo: look up domains hosted on this server and loop through each
210+
wf($config_dir.'/'.$configfile, $content);
211+
212+
$configfile = 'blacklist_helo';
213+
if(is_file($config_dir.'/'.$configfile)) {
214+
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
215+
chmod($config_dir.'/'.$configfile.'~', 0400);
216+
}
217+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
218+
$content = strtr($content, $postconf_placeholders);
219+
wf($config_dir.'/'.$configfile, $content);
220+
200221
//* Make a backup copy of the main.cf file
201222
copy($config_dir.'/main.cf', $config_dir.'/main.cf~');
202223

0 commit comments

Comments
 (0)