@@ -144,21 +144,21 @@ public function configure_amavis() {
144144 if (is_file ($ conf ['postfix ' ]['config_dir ' ].'/master.cf ' )) copy ($ conf ['postfix ' ]['config_dir ' ].'/master.cf ' , $ conf ['postfix ' ]['config_dir ' ].'/master.cf~ ' );
145145 $ content = rf ($ conf ['postfix ' ]['config_dir ' ].'/master.cf ' );
146146 // Only add the content if we had not addded it before
147- if (!stristr ( $ content , ' amavis ' )) {
147+ if (!preg_match ( ' /^ amavis\s+/m ' , $ content )) {
148148 unset($ content );
149149 $ content = rfsel ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/master_cf_amavis.master ' , 'tpl/master_cf_amavis.master ' );
150150 af ($ conf ['postfix ' ]['config_dir ' ].'/master.cf ' , $ content );
151151 $ content = rf ($ conf ['postfix ' ]['config_dir ' ].'/master.cf ' );
152152 }
153- if (!stristr ( $ content , ' 127.0.0.1:10025 ' )) {
153+ if (!preg_match ( ' /^ 127.0.0.1:10025\s+/m ' , $ content )) {
154154 unset($ content );
155- $ content = rfsel ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/master_cf_amavis .master ' , 'tpl/master_cf_amavis10025.master ' );
155+ $ content = rfsel ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/master_cf_amavis10025 .master ' , 'tpl/master_cf_amavis10025.master ' );
156156 af ($ conf ['postfix ' ]['config_dir ' ].'/master.cf ' , $ content );
157157 $ content = rf ($ conf ['postfix ' ]['config_dir ' ].'/master.cf ' );
158158 }
159- if (!stristr ( $ content , ' 127.0.0.1:10027 ' )) {
159+ if (!preg_match ( ' /^ 127.0.0.1:10027\s+/m ' , $ content )) {
160160 unset($ content );
161- $ content = rfsel ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/master_cf_amavis .master ' , 'tpl/master_cf_amavis10027.master ' );
161+ $ content = rfsel ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/master_cf_amavis10027 .master ' , 'tpl/master_cf_amavis10027.master ' );
162162 af ($ conf ['postfix ' ]['config_dir ' ].'/master.cf ' , $ content );
163163 }
164164 unset($ content );
0 commit comments