@@ -112,8 +112,19 @@ public function configure_postfix($options = '')
112112 $ stress_adaptive_placeholder = '#{stress_adaptive} ' ;
113113 $ stress_adaptive = (isset ($ server_ini_array ['mail ' ]['stress_adaptive ' ]) && ($ server_ini_array ['mail ' ]['stress_adaptive ' ] == 'y ' )) ? '' : $ stress_adaptive_placeholder ;
114114
115+ $ reject_unknown_client_hostname ='' ;
116+ if (isset ($ server_ini_array ['mail ' ]['reject_unknown ' ]) && ($ server_ini_array ['mail ' ]['reject_unknown ' ] == 'client ' || $ server_ini_array ['mail ' ]['reject_unknown ' ] == 'client_helo ' )) {
117+ $ reject_unknown_client_hostname =',reject_unknown_client_hostname ' ;
118+ }
119+ $ reject_unknown_helo_hostname ='' ;
120+ if ((!isset ($ server_ini_array ['mail ' ]['reject_unknown ' ])) || $ server_ini_array ['mail ' ]['reject_unknown ' ] == 'helo ' || $ server_ini_array ['mail ' ]['reject_unknown ' ] == 'client_helo ' ) {
121+ $ reject_unknown_helo_hostname =',reject_unknown_helo_hostname ' ;
122+ }
123+
115124 unset($ server_ini_array );
116125
126+ $ myhostname = str_replace ('. ' ,'\. ' ,$ conf ['hostname ' ]);
127+
117128 $ postconf_placeholders = array ('{config_dir} ' => $ config_dir ,
118129 '{vmail_mailbox_base} ' => $ cf ['vmail_mailbox_base ' ],
119130 '{vmail_userid} ' => $ cf ['vmail_userid ' ],
@@ -122,7 +133,10 @@ public function configure_postfix($options = '')
122133 '{greylisting} ' => $ greylisting ,
123134 '{reject_slm} ' => $ reject_sender_login_mismatch ,
124135 '{reject_aslm} ' => $ reject_authenticated_sender_login_mismatch ,
136+ '{myhostname} ' => $ myhostname ,
125137 $ stress_adaptive_placeholder => $ stress_adaptive ,
138+ '{reject_unknown_client_hostname} ' => $ reject_unknown_client_hostname ,
139+ '{reject_unknown_helo_hostname} ' => $ reject_unknown_helo_hostname ,
126140 );
127141
128142 $ postconf_tpl = rfsel ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/gentoo_postfix.conf.master ' , 'tpl/gentoo_postfix.conf.master ' );
0 commit comments