From 0dfa506057a11bb6f773b8e8dae0bc31c99431c4 Mon Sep 17 00:00:00 2001 From: Jesse Norell <jesse@kci.net> Date: Fri, 15 Jan 2021 16:45:41 -0700 Subject: [PATCH] installer: reject_unlisted_senders in smtpd_sender_restrictions --- install/lib/installer_base.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 50376e455e..357aa7abeb 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1798,9 +1798,10 @@ class installer_base { if ($mail_config['reject_sender_login_mismatch'] == 'y') { array_splice($new_options, 0, 0, array('reject_authenticated_sender_login_mismatch')); + // insert before permit_sasl_authenticated for ($i = 0; isset($new_options[$i]); $i++) { - if ($new_options[$i] == 'permit_mynetworks') { - array_splice($new_options, $i+1, 0, array('reject_sender_login_mismatch')); + if ($new_options[$i] == 'permit_sasl_authenticated') { + array_splice($new_options, $i, 0, array('reject_sender_login_mismatch')); break; } } -- GitLab