Marius Cramer
2015-04-16 cb6197323c0447a0299620f8f437107262b52f30
install/dist/lib/fedora.lib.php
@@ -143,6 +143,9 @@
      //* mysql-virtual_sender.cf
      $this->process_postfix_config('mysql-virtual_sender.cf');
      //* mysql-virtual_sender_login_maps.cf
      $this->process_postfix_config('mysql-virtual_sender_login_maps.cf');
      //* mysql-virtual_client.cf
      $this->process_postfix_config('mysql-virtual_client.cf');
@@ -195,23 +198,28 @@
         }
      }
      unset($rbl_hosts);
      unset($server_ini_array);
      
      //* If Postgrey is installed, configure it
      $greylisting = '';
      if($conf['postgrey']['installed'] == true) {
         $greylisting = 'check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf';
         $greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf';
      }
      
      //* These postconf commands will be executed on installation and update
      $reject_sender_login_mismatch = '';
      if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) {
         $reject_sender_login_mismatch = ', reject_authenticated_sender_login_mismatch';
      }
      unset($server_ini_array);
      $postconf_placeholders = array('{config_dir}' => $config_dir,
         '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
         '{vmail_userid}' => $cf['vmail_userid'],
         '{vmail_groupid}' => $cf['vmail_groupid'],
         '{rbl_list}' => $rbl_list,
         '{greylisting}' => $greylisting,
         '{reject_slm}' => $reject_sender_login_mismatch,
      );
      $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_postfix.conf.master', 'tpl/fedora_postfix.conf.master');
      $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders);
      $postconf_commands = array_filter(explode("\n", $postconf_tpl)); // read and remove empty lines