@@ -135,6 +135,7 @@ public function find_installed_apps() {
135135
136136 if (is_installed ('mysql ' ) || is_installed ('mysqld ' )) $ conf ['mysql ' ]['installed ' ] = true ;
137137 if (is_installed ('postfix ' )) $ conf ['postfix ' ]['installed ' ] = true ;
138+ if (is_installed ('postgrey ' )) $ conf ['postgrey ' ]['installed ' ] = true ;
138139 if (is_installed ('mailman ' )) $ conf ['mailman ' ]['installed ' ] = true ;
139140 if (is_installed ('apache ' ) || is_installed ('apache2 ' ) || is_installed ('httpd ' ) || is_installed ('httpd2 ' )) $ conf ['apache ' ]['installed ' ] = true ;
140141 if (is_installed ('getmail ' )) $ conf ['getmail ' ]['installed ' ] = true ;
@@ -704,6 +705,9 @@ public function configure_postfix($options = '') {
704705 //* mysql-virtual_outgoing_bcc.cf
705706 $ this ->process_postfix_config ('mysql-virtual_outgoing_bcc.cf ' );
706707
708+ //* mysql-virtual_policy_greylist.cf
709+ $ this ->process_postfix_config ('mysql-virtual_policy_greylist.cf ' );
710+
707711 //* postfix-dkim
708712 $ full_file_name =$ config_dir .'/tag_as_originating.re ' ;
709713 if (is_file ($ full_file_name )) copy ($ full_file_name , $ full_file_name .'~ ' );
@@ -742,11 +746,19 @@ public function configure_postfix($options = '') {
742746 unset($ rbl_hosts );
743747 unset($ server_ini_array );
744748
749+ //* If Postgrey is installed, configure it
750+ $ greylisting = '' ;
751+ if ($ conf ['postgrey ' ]['installed ' ] == true ) {
752+ $ greylisting = 'check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf ' ;
753+ }
754+
745755 $ postconf_placeholders = array ('{config_dir} ' => $ config_dir ,
746756 '{vmail_mailbox_base} ' => $ cf ['vmail_mailbox_base ' ],
747757 '{vmail_userid} ' => $ cf ['vmail_userid ' ],
748758 '{vmail_groupid} ' => $ cf ['vmail_groupid ' ],
749- '{rbl_list} ' => $ rbl_list );
759+ '{rbl_list} ' => $ rbl_list ,
760+ '{greylisting} ' => $ greylisting ,
761+ );
750762
751763 $ postconf_tpl = rfsel ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/debian_postfix.conf.master ' , 'tpl/debian_postfix.conf.master ' );
752764 $ postconf_tpl = strtr ($ postconf_tpl , $ postconf_placeholders );
@@ -841,6 +853,10 @@ public function configure_postfix($options = '') {
841853 caselog ($ command ." &> /dev/null " , __FILE__ , __LINE__ , "EXECUTED: $ command " , "Failed to execute the command $ command " );
842854
843855 }
856+
857+ public function configure_postgrey () {
858+
859+ }
844860
845861 public function configure_saslauthd () {
846862 global $ conf ;
0 commit comments