@@ -1182,6 +1182,12 @@ public function configure_postfix($options = '') {
11821182 $ content = strtr ($ content , $ postconf_placeholders );
11831183 $ postconf_commands = array_merge ($ postconf_commands , array_filter (explode ("\n" , $ content )));
11841184 }
1185+ $ configfile = 'postfix_custom.conf ' ;
1186+ if (file_exists ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/ ' . $ configfile . '.master ' )) {
1187+ $ content = rfsel ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/ ' .$ configfile .'.master ' );
1188+ $ content = strtr ($ content , $ postconf_placeholders );
1189+ $ postconf_commands = array_merge ($ postconf_commands , array_filter (explode ("\n" , $ content )));
1190+ }
11851191
11861192 // Remove comment lines, these would give fatal errors when passed to postconf.
11871193 $ postconf_commands = array_filter ($ postconf_commands , function ($ line ) { return preg_match ('/^[^#]/ ' , $ line ); });
@@ -1535,6 +1541,10 @@ public function configure_dovecot() {
15351541 } else {
15361542 copy ('tpl/debian_dovecot2.conf.master ' , $ config_dir .'/ ' .$ configfile );
15371543 }
1544+ // Copy custom config file
1545+ if (is_file ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/dovecot_custom.conf.master ' )) {
1546+ copy ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/dovecot_custom.conf.master ' , $ config_dir .'/conf.d/99-ispconfig-custom-config.conf ' );
1547+ }
15381548 replaceLine ($ config_dir .'/ ' .$ configfile , 'postmaster_address = postmaster@example.com ' , 'postmaster_address = postmaster@ ' .$ conf ['hostname ' ], 1 , 0 );
15391549 replaceLine ($ config_dir .'/ ' .$ configfile , 'postmaster_address = webmaster@localhost ' , 'postmaster_address = postmaster@ ' .$ conf ['hostname ' ], 1 , 0 );
15401550 if (version_compare ($ dovecot_version , 2.1 , '< ' )) {
0 commit comments