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; }