From 6c84ceeb9472dab3fac88a2bc0fbd15f7a536908 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Thu, 9 May 2024 08:35:57 +0100 Subject: [PATCH] see #826 - avoid $no_vacation_pattern of "" causing everyone to be skipped --- VIRTUAL_VACATION/vacation.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VIRTUAL_VACATION/vacation.pl b/VIRTUAL_VACATION/vacation.pl index 2fce0945..ad762ae5 100644 --- a/VIRTUAL_VACATION/vacation.pl +++ b/VIRTUAL_VACATION/vacation.pl @@ -774,7 +774,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); }