Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/techsneeze/dmarcts-report-parser.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpressy <bart@terta.de>2017-08-21 21:01:04 +0300
committerpressy <bart@terta.de>2017-08-21 21:01:04 +0300
commit436cfe5d2e8b574c8ab8d20c784531c1d58048a2 (patch)
treed909345bc5e39884bd7d2d520d018e2230ee5071
parent02a7b12ef72e63e8ec3c170153a8ad66d25d74f5 (diff)
check for $imapfolder set and include ssl module for correct tls usage
-rwxr-xr-xdmarcts-report-parser.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/dmarcts-report-parser.pl b/dmarcts-report-parser.pl
index 1ab7cef..542fbd2 100755
--- a/dmarcts-report-parser.pl
+++ b/dmarcts-report-parser.pl
@@ -72,7 +72,7 @@ use Socket;
use Socket6;
use PerlIO::gzip;
use File::Basename ();
-
+use IO::Socket::SSL;
@@ -142,6 +142,11 @@ if ( substr($conf_file, 0, 1) ne '/' and substr($conf_file, 0, 1) ne '.') {
my $conf_return = do $conf_file;
die "couldn't parse $conf_file: $@" if $@;
die "couldn't do $conf_file: $!" unless defined $conf_return;
+
+# check config
+if (!defined $imapreadfolder ) {
+ die "\$imapreadfolder not defined. Check config file";
+}
# Get command line options.
my %options = ();
@@ -210,7 +215,7 @@ if ($reports_source == TS_IMAP) {
# Disable verify mode for TLS support.
if ($imaptls == 1) {
- $imapopt = [ SSL_verify_mode => 0 ];
+ $imapopt = [ SSL_verify_mode => SSL_VERIFY_NONE ];
}
# Setup connection to IMAP server.