Permalink
Browse files

Changes the verify mode for TLS. This seems to fix #15 and may make #14

… better.
1 parent 82e99ed commit 6d52253d06c9e6589383906ade1ae77482f12dd8 @techsneeze committed Apr 5, 2016
Showing with 7 additions and 2 deletions.
  1. +7 −2 dmarcts-report-parser.pl
@@ -99,7 +99,7 @@
# Define all possible configuration options.
our ($debug, $delete_reports, $dbname, $dbuser, $dbpass, $dbhost,
$imapserver, $imapuser, $imappass, $imapssl, $imaptls,
- $imapmovefolder, $imapreadfolder);
+ $imapmovefolder, $imapreadfolder, $imapopt);
@@ -152,10 +152,15 @@
# Process messages based on $reports_source.
if ($reports_source == TS_IMAP) {
+ # Disable verify mode for TLS support.
+ if ($imaptls == 1) {
+ $imapopt = [ SSL_verify_mode => 0 ];
+ }
+
# Setup connection to IMAP server.
my $imap = Mail::IMAPClient->new( Server => $imapserver,
Ssl => $imapssl,
- Starttls => $imaptls,
+ Starttls => $imapopt,
User => $imapuser,
Password => $imappass)
# module uses eval, so we use $@ instead of $!

0 comments on commit 6d52253

Please sign in to comment.