see #826 - avoid $no_vacation_pattern of "" causing everyone to be skipped

This commit is contained in:
David Goodwin committed 2024-05-09 08:43:07 +01:00
1 parent fd1948602f
commit 364f98632f
1 file changed
+2 -1
+2 -1
View File
@@ -646,7 +646,8 @@ if(!$from || !$to || !$messageid || !$smtp_sender || !$smtp_recipient) {
}
$logger->debug("Email headers have to: '$to' and From: '$from'");
if ($to =~ /^.*($no_vacation_pattern).*/i) {
# See https://github.com/postfixadmin/postfixadmin/issues/826 - an empty string would match anything, probably not desirable.
if($no_vacation_pattern ne '' && $to =~ /^.*($no_vacation_pattern).*/i) {
$logger->debug("Will not send vacation reply for messages to $to");
exit(0);
}