@@ -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
0 commit comments