- Fixed FS#2783 - server config / mail / rbl list.
| | |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'validators' => array ( 0 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])(,\s*(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]))*$/', |
| | | 'errmsg'=> 'rbl_error_regex'), |
| | | ), |
| | | 'value' => '', |
| | | 'width' => '40', |
| | | 'maxlength' => '255' |
| | |
| | | $wb['web_folder_protection_txt'] = 'Webverzeichnis unveränderlich machen (erweiterte Attribute)'; |
| | | $wb['overtraffic_notify_admin_txt'] = 'Überschreiten des Transfer Limits an den Administrator senden'; |
| | | $wb['overtraffic_notify_client_txt'] = 'Überschreiten des Transfer Limits an den Kunden senden'; |
| | | $wb["rbl_error_regex"] = 'Bitte geben Sie gültige RBL-Hostnamen an.'; |
| | | ?> |
| | |
| | | $wb["web_folder_protection_txt"] = 'Make web folders immutable (extended attributes)';
|
| | | $wb["overtraffic_notify_admin_txt"] = 'Send overtraffic notification to admin';
|
| | | $wb["overtraffic_notify_client_txt"] = 'Send overtraffic notification to client';
|
| | | $wb["rbl_error_regex"] = 'Please specify valid RBL hostnames.';
|
| | | ?>
|
| | |
| | | |
| | | // get the config |
| | | $app->uses("getconf"); |
| | | $old_ini_data = $app->ini_parser->parse_ini_string($data['old']['config']); |
| | | $mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail'); |
| | | |
| | | copy('/etc/postfix/main.cf','/etc/postfix/main.cf~'); |
| | |
| | | exec("postconf -e 'relayhost ='"); |
| | | } |
| | | |
| | | if($mail_config['realtime_blackhole_list'] != '') { |
| | | $rbl_hosts = explode(",",str_replace(" ", "", $mail_config['realtime_blackhole_list'])); |
| | | if($mail_config['realtime_blackhole_list'] != $old_ini_data['mail']['realtime_blackhole_list']) { |
| | | $rbl_hosts = trim(preg_replace('/\s+/', '', $mail_config['realtime_blackhole_list'])); |
| | | if($rbl_hosts != ''){ |
| | | $rbl_hosts = explode(",", $rbl_hosts); |
| | | } |
| | | $options = explode(", ", exec("postconf -h smtpd_recipient_restrictions")); |
| | | foreach ($options as $key => $value) { |
| | | if (!preg_match('/reject_rbl_client/', $value)) { |
| | | $new_options[] = $value; |
| | | } |
| | | } |
| | | if(is_array($rbl_hosts) && !empty($rbl_hosts)){ |
| | | foreach ($rbl_hosts as $key => $value) { |
| | | $new_options[] = "reject_rbl_client ".$value; |
| | | $value = trim($value); |
| | | if($value != '') $new_options[] = "reject_rbl_client ".$value; |
| | | } |
| | | |
| | | } |
| | | exec("postconf -e 'smtpd_recipient_restrictions = ".implode(", ", $new_options)."'"); |
| | | } |
| | | |