File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ function update($event_name, $data) {
109109 }
110110
111111 if ($ mail_config ['realtime_blackhole_list ' ] != $ old_ini_data ['mail ' ]['realtime_blackhole_list ' ]) {
112+ $ rbl_updated = false ;
112113 $ rbl_hosts = trim (preg_replace ('/\s+/ ' , '' , $ mail_config ['realtime_blackhole_list ' ]));
113114 if ($ rbl_hosts != '' ){
114115 $ rbl_hosts = explode (", " , $ rbl_hosts );
@@ -117,9 +118,18 @@ function update($event_name, $data) {
117118 foreach ($ options as $ key => $ value ) {
118119 if (!preg_match ('/reject_rbl_client/ ' , $ value )) {
119120 $ new_options [] = $ value ;
121+ } else {
122+ if (is_array ($ rbl_hosts ) && !empty ($ rbl_hosts ) && !$ rbl_updated ){
123+ $ rbl_updated = true ;
124+ foreach ($ rbl_hosts as $ key => $ value ) {
125+ $ value = trim ($ value );
126+ if ($ value != '' ) $ new_options [] = "reject_rbl_client " .$ value ;
127+ }
128+ }
120129 }
121130 }
122- if (is_array ($ rbl_hosts ) && !empty ($ rbl_hosts )){
131+ //* first time add rbl-list
132+ if (!$ rbl_updated && is_array ($ rbl_hosts ) && !empty ($ rbl_hosts )) {
123133 foreach ($ rbl_hosts as $ key => $ value ) {
124134 $ value = trim ($ value );
125135 if ($ value != '' ) $ new_options [] = "reject_rbl_client " .$ value ;
You can’t perform that action at this time.
0 commit comments