You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53-32Lines changed: 53 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ A Perl based tool to parse DMARC reports, based on John Levine's [rddmarc](http:
8
8
9
9
Open Report Parser is a fork of [techsneeze's dmarcts-report-parser](https://github.com/techsneeze/dmarcts-report-parser), and was forked to more closely match the needs of [Open DMARC Analyzer](https://github.com/userjack6880/Open-DMARC-Analyzer).
10
10
11
-
Open Report Parser Version 0 Alpha 1 (0-α1) is an [Anomaly \<Codebase\>](https://systemanomaly.com/codebase) project by John Bradley ([email protected]).
11
+
Open Report Parser Version 0 Alpha 1 (0-α2) is an [Anomaly \<Codebase\>](https://systemanomaly.com/codebase) project by John Bradley ([email protected]).
12
12
13
13
# Minimum Requirements
14
14
@@ -93,21 +93,26 @@ innodb_file_per_table = true
93
93
94
94
# Configuration Options
95
95
96
-
**Debug Options**
96
+
**Script Options**
97
97
98
98
```perl
99
99
$debug = 0;
100
100
$delete_reports = 0;
101
+
#$dmarc_only = 0;
102
+
# if set to 1, do not process tls reports, if set to -1 do not process
103
+
# dmarc reports - defaults to 1 for legacy support
104
+
# this is ignored for all methods except IMAP, use --tls to process
105
+
# TLS reports for other methods
101
106
```
102
107
103
108
**Database Options**
104
109
105
110
```perl
106
-
#$dbtype = 'mysql'; # Supported types - mysql, postgres - defaults to mysql if unset
111
+
#$dbtype = 'mysql'; # Supported types - mysql, postgres - defaults to mysql if unset
107
112
$dbname = 'dmarc';
108
113
$dbuser = 'dmarc';
109
114
$dbpass = 'password';
110
-
$dbhost = 'dbhost';# Set the hostname if we can't connect to the local socket.
115
+
#$dbhost = 'dbhost'; # Set the hostname if we can't connect to the local socket.
$imapssl = '0'; # If set to 1, remember to change server port to 993 and disable imaptls.
122
-
$imaptls = '0'; # Enabled as the default and best-practice.
123
-
$tlsverify = '0'; # Enable verify server cert as the default and best-practice.
124
-
$imapignoreerror = '0'; # set it to 1 if you see an "ERROR: message_string()
125
-
# expected 119613 bytes but received 81873 you may
126
-
# need the IgnoreSizeErrors option" because of malfunction
127
-
# imap server as MS Exchange 2007, ...
128
-
$imapreadfolder = 'dmarc';
129
-
130
-
# If $imapmovefolder is set, processed IMAP messages will be moved (overruled by
126
+
$imapssl = '0'; # If set to 1, remember to change server port to 993 and disable imaptls.
127
+
$imaptls = '0';
128
+
$tlsverify = '0';
129
+
$imapignoreerror = '0'; # recommended if you use MS Exchange 2007, ...
130
+
131
+
$imapdmarcfolder = 'dmarc';
132
+
$imaptlsfolder = 'tls';
133
+
134
+
# If $imapxxxproc is set, processed IMAP messages will be moved (overruled by
131
135
# the --delete option!)
132
-
$imapmovefolder = 'dmarc/processed';
136
+
# $imapdmarcproc = 'dmarc.Processed';
137
+
# $imaptlsproc = 'tls.Processed';
138
+
139
+
# If $imapxxxerr is set, IMAP messages that fail will be moved. If unset, failed messages
140
+
# will move to $imapdmarcproc (if it is set). Overruled by the --delete option!
141
+
# $imapdmarcerr = 'dmarc.notProcessed';
142
+
# $imaptlserr = 'tls.notProcessed';
133
143
```
134
144
135
145
These settings are ignored when using the -m flag.
136
146
137
147
**XML Storage Options**
138
148
139
149
```perl
140
-
# maximum size of XML files to store in database, long files can cause transaction aborts
150
+
# maximum size of XML/JSON files to store in database, long files can cause transaction aborts
141
151
$maxsize_xml = 50000;
152
+
$maxsize_json = 50000;
142
153
143
-
# store XML as base64 encopded gzip in database (save space, harder usable)
154
+
# store XML/JSON as base64 encopded gzip in database (save space, harder usable)
144
155
$compress_xml = 0;
156
+
$compress_json = 0;
145
157
```
146
158
147
-
**Processing Failure Action***
159
+
**Processing Failure Action**
148
160
149
161
```perl
150
162
# if there was an error during file processing (message does not contain XML or ZIP parts,
@@ -161,7 +173,7 @@ Note: Be sure to use the proper hierarchy separator for your server in all folde
161
173
# Usage
162
174
163
175
```
164
-
./dmarcts-report-parser.pl [OPTIONS] [PATH]
176
+
./report-parser.pl [OPTIONS] [PATH]
165
177
```
166
178
167
179
PATH can be the filename of a single file or a list of files - wildcard expression are allowed.
@@ -171,27 +183,35 @@ PATH can be the filename of a single file or a list of files - wildcard expressi
171
183
One of the following source options must be provided:
172
184
173
185
```
174
-
-i : Read reports from messages on IMAP server as defined in the config file.
175
-
-m : Read reports from mbox file(s) provided in PATH.
176
-
-e : Read reports from MIME email file(s) provided in PATH.
177
-
-x : Read reports from xml file(s) provided in PATH.
178
-
-z : Read reports from zip file(s) provided in PATH.
186
+
-i : Read reports from messages on IMAP server as defined in the
187
+
config file.
188
+
-m : Read reports from mbox file(s) provided in PATH.
189
+
-e : Read reports from MIME email file(s) provided in PATH.
190
+
-x : Read reports from xml file(s) provided in PATH.
191
+
-j : Read reports from json files(s) provided in PATH.
192
+
-z : Read reports from zip file(s) provided in PATH.
179
193
```
180
194
181
195
The following options are always allowed:
182
196
183
197
```
184
-
-d : Print debug info.
185
-
-r : Replace existing reports rather than failing.
186
-
--delete : Delete processed message files (the XML is stored in the database for later reference).
187
-
--info | Print out number of XML files or emails processed.
198
+
-d : Print debug info.
199
+
-r : Replace existing reports rather than skipping them.
200
+
--delete : Delete processed message files (the XML is stored in the
201
+
database for later reference).
202
+
--info : Print out number of XML files or emails processed.
203
+
--tls : Force TLS-Only Mode.
188
204
```
189
205
206
+
Currently, processing of both DMARC and TLS reports during the same run is only supported from IMAP. All other sources will *always* default to DMARC reports unless the `--tls` flag is provided at runtime.
207
+
190
208
# Latest Changes
191
209
192
-
## 0-α1
193
-
- Fork renamed
194
-
- Incorporate changes made to original repository after fork ([commit 51ba1de](https://github.com/userjack6880/Open-Report-Parser/commit/51ba1de8521559647ebe4b8a1db291c26b572de4))
210
+
## 0-α2
211
+
- Fixed errors in previous release incorporating postgres support related to table creation.
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,10 @@
2
2
3
3
## 0-α1
4
4
- Fork renamed
5
-
- Incorporate changes made to original repository after fork ([commit 51ba1de](https://github.com/userjack6880/Open-Report-Parser/commit/51ba1de8521559647ebe4b8a1db291c26b572de4))
5
+
- Incorporate changes made to original repository after fork ([commit 51ba1de](https://github.com/userjack6880/Open-Report-Parser/commit/51ba1de8521559647ebe4b8a1db291c26b572de4))
6
+
7
+
## 0-α2
8
+
- Fixed errors in previous release incorporating postgres support related to table creation.
0 commit comments