diff options
author | TechSneeze <dave@techsneeze.com> | 2019-03-31 01:39:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-31 01:39:17 +0300 |
commit | b25a093b36932f2376683a5e21b1a6e8a6a477d2 (patch) | |
tree | 0b80d5d9af5f126cbd95824c34219d3ada388165 | |
parent | 54080059e8f7e8c05b1d13f15946cf6b0b86bc20 (diff) | |
parent | f6fea74322666cf5790b43ea09515a7a3e609f31 (diff) |
Merge pull request #62 from smpita/master
Configure DB port
-rw-r--r-- | dmarcts-report-parser.conf.sample | 1 | ||||
-rwxr-xr-x | dmarcts-report-parser.pl | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/dmarcts-report-parser.conf.sample b/dmarcts-report-parser.conf.sample index 82266fd..6725653 100644 --- a/dmarcts-report-parser.conf.sample +++ b/dmarcts-report-parser.conf.sample @@ -12,6 +12,7 @@ $dbname = 'dmarc'; $dbuser = 'dmarc'; $dbpass = 'xxx'; $dbhost = ''; # Set the hostname if we can't connect to the local socket. +$dbport = '3306'; $imapserver = 'mail.example.com:143'; $imapuser = 'dmarcreports'; diff --git a/dmarcts-report-parser.pl b/dmarcts-report-parser.pl index 00043b7..32d6d63 100755 --- a/dmarcts-report-parser.pl +++ b/dmarcts-report-parser.pl @@ -115,7 +115,7 @@ sub show_usage { # Define all possible configuration options. our ($debug, $delete_reports, $delete_failed, $reports_replace, $maxsize_xml, $compress_xml, - $dbname, $dbuser, $dbpass, $dbhost, + $dbname, $dbuser, $dbpass, $dbhost, $dbport, $imapserver, $imapuser, $imappass, $imapignoreerror, $imapssl, $imaptls, $imapmovefolder, $imapreadfolder, $imapopt, $tlsverify); # defaults @@ -207,7 +207,7 @@ if (exists $options{delete}) {$delete_reports = 1;} # Setup connection to database server. -my $dbh = DBI->connect("DBI:mysql:database=$dbname;host=$dbhost", +my $dbh = DBI->connect("DBI:mysql:database=$dbname;host=$dbhost;port=$dbport", $dbuser, $dbpass) or die "Cannot connect to database\n"; checkDatabase($dbh); |