Skip to content

Commit

Permalink
see #826 - avoid $no_vacation_pattern of "" causing everyone to be sk…
Browse files Browse the repository at this point in the history
…ipped
  • Loading branch information
DavidGoodwin committed May 9, 2024
1 parent fd19486 commit 364f986
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion VIRTUAL_VACATION/vacation.pl
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,8 @@ sub check_and_clean_from_address {
}
$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);
}
Expand Down

0 comments on commit 364f986

Please sign in to comment.