From d7c8186bcc1fca430a2cff4f2691c602e210f8b2 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 3 Mar 2016 17:01:59 -0800 Subject: Add IMAP SSL config option and support --- imap-dmarcts.conf | 3 ++- imap-dmarcts.txt | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/imap-dmarcts.conf b/imap-dmarcts.conf index 96fe4b2..491be0a 100644 --- a/imap-dmarcts.conf +++ b/imap-dmarcts.conf @@ -3,9 +3,10 @@ $debug = 0; $imapserver = 'mail.example.com:143'; $imapuser = 'dmarcreports'; $imappass = 'xxx'; +$imapssl = '0'; # set imapssl to 1 and remember to change server port to 993 $mvfolder = 'processed'; $readfolder = 'Inbox'; $dbname = 'dmarc'; $dbuser = 'dmarc'; $dbpass = 'xxx'; -$dbhost = 'xxx'; +$dbhost = ''; # set the hostname if we can't connect to the local socket diff --git a/imap-dmarcts.txt b/imap-dmarcts.txt index 6009f79..1fddad3 100755 --- a/imap-dmarcts.txt +++ b/imap-dmarcts.txt @@ -29,12 +29,13 @@ our $debug = 0; our $imapserver = 'mail.example.com:143'; our $imapuser = 'dmarcreports'; our $imappass = 'xxx'; +our $imapssl = '0'; our $mvfolder = 'processed'; our $readfolder = 'Inbox'; our $dbname = 'dmarc'; our $dbuser = 'dmarc'; our $dbpass = 'xxx'; -our $dbhost = 'xxx'; +our $dbhost = ''; # Override hardcoded script configuration options by local config file (does not need to exists) do "imap-dmarcts.conf"; @@ -47,6 +48,7 @@ do "imap-dmarcts.conf"; # Setup connections to servers. my $imap = Mail::IMAPClient->new( Server => $imapserver, + Ssl => $imapssl, User => $imapuser, Password => $imappass) # module uses eval, so we use $@ instead of $! -- cgit v1.2.3