From bfeba8824ebf684eef4f97b621bf325fcb3c1fc3 Mon Sep 17 00:00:00 2001 From: mischa Date: Mon, 22 Aug 2022 16:41:46 +0000 Subject: [PATCH] hardcoded path to config file in /etc/mail --- VIRTUAL_VACATION/vacation.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/VIRTUAL_VACATION/vacation.pl b/VIRTUAL_VACATION/vacation.pl index eb37755..edfc91d 100755 --- a/VIRTUAL_VACATION/vacation.pl +++ b/VIRTUAL_VACATION/vacation.pl @@ -22,7 +22,7 @@ use Getopt::Std; use DBI; use POSIX qw(strftime); -# -c = location of the SQL config file for OpenSMTPD +# -c = location of the SQL config file for OpenSMTPD, located in /etc/mail # -l = logging of virtual vacation parsed report/filter streams and decisions # -v = verbose (extra flag) logging of report stream # -d = debug (extra flag) logging of filter stream @@ -35,8 +35,8 @@ my $db_user = ''; my $db_pass = ''; my $db_name = ''; -if ($opt_c && -e $opt_c) { - open (my $fh_config, '<', $opt_c); +if ($opt_c && -e "/etc/mail/$opt_c") { + open (my $fh_config, '<', "/etc/mail/$opt_c"); while (my $line = <$fh_config>) { chomp $line; if ($line =~ /^host\s+(.*)$/) { $db_host = $1; }