This commit is contained in:
Sean Whalen
2018-03-06 07:18:00 -05:00
parent 3d4ca097cc
commit a59263cbd7
9 changed files with 91 additions and 46 deletions
+4 -4
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Overview: module code &mdash; parsedmarc 2.1.0 documentation</title>
<title>Overview: module code &mdash; parsedmarc 2.1.1 documentation</title>
@@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="parsedmarc 2.1.0 documentation" href="../index.html"/>
<link rel="top" title="parsedmarc 2.1.1 documentation" href="../index.html"/>
<script src="../_static/js/modernizr.min.js"></script>
@@ -64,7 +64,7 @@
<div class="version">
2.1.0
2.1.1
</div>
@@ -187,7 +187,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'2.1.0',
VERSION:'2.1.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
+34 -22
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>parsedmarc &mdash; parsedmarc 2.1.0 documentation</title>
<title>parsedmarc &mdash; parsedmarc 2.1.1 documentation</title>
@@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="../genindex.html"/>
<link rel="search" title="Search" href="../search.html"/>
<link rel="top" title="parsedmarc 2.1.0 documentation" href="../index.html"/>
<link rel="top" title="parsedmarc 2.1.1 documentation" href="../index.html"/>
<link rel="up" title="Module code" href="index.html"/>
@@ -65,7 +65,7 @@
<div class="version">
2.1.0
2.1.1
</div>
@@ -199,7 +199,7 @@
<span class="kn">import</span> <span class="nn">dateparser</span>
<span class="kn">import</span> <span class="nn">mailparser</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s2">&quot;2.1.0&quot;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s2">&quot;2.1.1&quot;</span>
<span class="n">logger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">setLevel</span><span class="p">(</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span><span class="p">)</span>
@@ -696,13 +696,13 @@
<span class="n">timeout</span><span class="o">=</span><span class="n">timeout</span><span class="p">)</span></div>
<div class="viewcode-block" id="parsed_aggregate_report_to_csv"><a class="viewcode-back" href="../index.html#parsedmarc.parsed_aggregate_report_to_csv">[docs]</a><span class="k">def</span> <span class="nf">parsed_aggregate_report_to_csv</span><span class="p">(</span><span class="n">_input</span><span class="p">):</span>
<div class="viewcode-block" id="parsed_aggregate_report_to_csv"><a class="viewcode-back" href="../index.html#parsedmarc.parsed_aggregate_report_to_csv">[docs]</a><span class="k">def</span> <span class="nf">parsed_aggregate_report_to_csv</span><span class="p">(</span><span class="n">reports</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Converts one or more parsed aggregate reports to flat CSV format, including</span>
<span class="sd"> headers</span>
<span class="sd"> Args:</span>
<span class="sd"> _input: A parsed aggregate report or list of parsed aggregate reports</span>
<span class="sd"> reports: A parsed aggregate report or list of parsed aggregate reports</span>
<span class="sd"> Returns:</span>
<span class="sd"> str: Parsed aggregate report data in flat CSV format, including headers</span>
@@ -721,10 +721,10 @@
<span class="n">writer</span> <span class="o">=</span> <span class="n">DictWriter</span><span class="p">(</span><span class="n">csv_file_object</span><span class="p">,</span> <span class="n">fields</span><span class="p">)</span>
<span class="n">writer</span><span class="o">.</span><span class="n">writeheader</span><span class="p">()</span>
<span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">_input</span><span class="p">)</span> <span class="o">==</span> <span class="n">OrderedDict</span><span class="p">:</span>
<span class="n">_input</span> <span class="o">=</span> <span class="p">[</span><span class="n">_input</span><span class="p">]</span>
<span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">reports</span><span class="p">)</span> <span class="o">==</span> <span class="n">OrderedDict</span><span class="p">:</span>
<span class="n">reports</span> <span class="o">=</span> <span class="p">[</span><span class="n">reports</span><span class="p">]</span>
<span class="k">for</span> <span class="n">report</span> <span class="ow">in</span> <span class="n">_input</span><span class="p">:</span>
<span class="k">for</span> <span class="n">report</span> <span class="ow">in</span> <span class="n">reports</span><span class="p">:</span>
<span class="n">xml_schema</span> <span class="o">=</span> <span class="n">report</span><span class="p">[</span><span class="s2">&quot;xml_schema&quot;</span><span class="p">]</span>
<span class="n">org_name</span> <span class="o">=</span> <span class="n">report</span><span class="p">[</span><span class="s2">&quot;report_metadata&quot;</span><span class="p">][</span><span class="s2">&quot;org_name&quot;</span><span class="p">]</span>
<span class="n">org_email</span> <span class="o">=</span> <span class="n">report</span><span class="p">[</span><span class="s2">&quot;report_metadata&quot;</span><span class="p">][</span><span class="s2">&quot;org_email&quot;</span><span class="p">]</span>
@@ -953,7 +953,17 @@
<span class="n">error</span><span class="o">.</span><span class="fm">__str__</span><span class="p">()))</span></div>
<span class="k">def</span> <span class="nf">parsed_dmarc_forensic_reports_to_csv</span><span class="p">(</span><span class="n">report</span><span class="p">):</span>
<div class="viewcode-block" id="parsed_dmarc_forensic_reports_to_csv"><a class="viewcode-back" href="../index.html#parsedmarc.parsed_dmarc_forensic_reports_to_csv">[docs]</a><span class="k">def</span> <span class="nf">parsed_dmarc_forensic_reports_to_csv</span><span class="p">(</span><span class="n">reports</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Converts one or more parsed forensic reports to flat CSV format, including</span>
<span class="sd"> headers</span>
<span class="sd"> Args:</span>
<span class="sd"> reports: A parsed forensic report or list of parsed forensic reports</span>
<span class="sd"> Returns:</span>
<span class="sd"> str: Parsed forensic report data in flat CSV format, including headers</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">fields</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;feedback_type&quot;</span><span class="p">,</span> <span class="s2">&quot;user_agent&quot;</span><span class="p">,</span> <span class="s2">&quot;version&quot;</span><span class="p">,</span> <span class="s2">&quot;original_envelope_id&quot;</span><span class="p">,</span>
<span class="s2">&quot;original_mail_from&quot;</span><span class="p">,</span> <span class="s2">&quot;original_rcpt_to&quot;</span><span class="p">,</span> <span class="s2">&quot;arrival_date&quot;</span><span class="p">,</span>
<span class="s2">&quot;arrival_date_utc&quot;</span><span class="p">,</span> <span class="s2">&quot;subject&quot;</span><span class="p">,</span> <span class="s2">&quot;message_id&quot;</span><span class="p">,</span>
@@ -962,26 +972,28 @@
<span class="s2">&quot;delivery_result&quot;</span><span class="p">,</span> <span class="s2">&quot;auth_failure&quot;</span><span class="p">,</span> <span class="s2">&quot;reported_domain&quot;</span><span class="p">,</span>
<span class="s2">&quot;authentication_mechanisms&quot;</span><span class="p">,</span> <span class="s2">&quot;sample_headers_only&quot;</span><span class="p">]</span>
<span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">reports</span><span class="p">)</span> <span class="o">==</span> <span class="n">OrderedDict</span><span class="p">:</span>
<span class="n">reports</span> <span class="o">=</span> <span class="p">[</span><span class="n">reports</span><span class="p">]</span>
<span class="n">csv_file</span> <span class="o">=</span> <span class="n">StringIO</span><span class="p">()</span>
<span class="n">csv_writer</span> <span class="o">=</span> <span class="n">DictWriter</span><span class="p">(</span><span class="n">csv_file</span><span class="p">,</span> <span class="n">fieldnames</span><span class="o">=</span><span class="n">fields</span><span class="p">)</span>
<span class="n">csv_writer</span><span class="o">.</span><span class="n">writeheader</span><span class="p">()</span>
<span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">report</span><span class="p">:</span>
<span class="n">row</span> <span class="o">=</span> <span class="n">row</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;source_ip_address&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">row</span><span class="p">[</span><span class="s2">&quot;source&quot;</span><span class="p">][</span><span class="s2">&quot;ip_address&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;source_reverse_dns&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">row</span><span class="p">[</span><span class="s2">&quot;source&quot;</span><span class="p">][</span><span class="s2">&quot;reverse_dns&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;source_base_domain&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">row</span><span class="p">[</span><span class="s2">&quot;source&quot;</span><span class="p">][</span><span class="s2">&quot;base_domain&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;source_country&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">row</span><span class="p">[</span><span class="s2">&quot;source&quot;</span><span class="p">][</span><span class="s2">&quot;country&quot;</span><span class="p">]</span>
<span class="k">for</span> <span class="n">report</span> <span class="ow">in</span> <span class="n">reports</span><span class="p">:</span>
<span class="n">row</span> <span class="o">=</span> <span class="n">report</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;source_ip_address&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">report</span><span class="p">[</span><span class="s2">&quot;source&quot;</span><span class="p">][</span><span class="s2">&quot;ip_address&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;source_reverse_dns&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">report</span><span class="p">[</span><span class="s2">&quot;source&quot;</span><span class="p">][</span><span class="s2">&quot;reverse_dns&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;source_base_domain&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">report</span><span class="p">[</span><span class="s2">&quot;source&quot;</span><span class="p">][</span><span class="s2">&quot;base_domain&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;source_country&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">report</span><span class="p">[</span><span class="s2">&quot;source&quot;</span><span class="p">][</span><span class="s2">&quot;country&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">row</span><span class="p">[</span><span class="s2">&quot;source&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;subject&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">row</span><span class="p">[</span><span class="s2">&quot;parsed_sample&quot;</span><span class="p">][</span><span class="s2">&quot;subject&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;auth_failure&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">row</span><span class="p">[</span><span class="s2">&quot;auth_failure&quot;</span><span class="p">])</span>
<span class="n">authentication_mechanisms</span> <span class="o">=</span> <span class="n">row</span><span class="p">[</span><span class="s2">&quot;authentication_mechanisms&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;subject&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">report</span><span class="p">[</span><span class="s2">&quot;parsed_sample&quot;</span><span class="p">][</span><span class="s2">&quot;subject&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;auth_failure&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">report</span><span class="p">[</span><span class="s2">&quot;auth_failure&quot;</span><span class="p">])</span>
<span class="n">authentication_mechanisms</span> <span class="o">=</span> <span class="n">report</span><span class="p">[</span><span class="s2">&quot;authentication_mechanisms&quot;</span><span class="p">]</span>
<span class="n">row</span><span class="p">[</span><span class="s2">&quot;authentication_mechanisms&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span>
<span class="n">authentication_mechanisms</span><span class="p">)</span>
<span class="k">del</span> <span class="n">row</span><span class="p">[</span><span class="s2">&quot;sample&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">row</span><span class="p">[</span><span class="s2">&quot;parsed_sample&quot;</span><span class="p">]</span>
<span class="n">csv_writer</span><span class="o">.</span><span class="n">writerow</span><span class="p">(</span><span class="n">row</span><span class="p">)</span>
<span class="k">return</span> <span class="n">csv_file</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span>
<span class="k">return</span> <span class="n">csv_file</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span></div>
<div class="viewcode-block" id="parse_report_email"><a class="viewcode-back" href="../index.html#parsedmarc.parse_report_email">[docs]</a><span class="k">def</span> <span class="nf">parse_report_email</span><span class="p">(</span><span class="n">input_</span><span class="p">,</span> <span class="n">nameservers</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="mf">6.0</span><span class="p">):</span>
@@ -1367,7 +1379,7 @@
<span class="sd"> mail_to : A list of addresses to mail to</span>
<span class="sd"> port (int): Port to use</span>
<span class="sd"> starttls (bool): use STARTTLS</span>
<span class="sd"> use_ssl (bool): Require an SSL connection from the start</span>
<span class="sd"> use_ssl (bool): Require a SSL connection from the start</span>
<span class="sd"> user: An optional username</span>
<span class="sd"> password: An optional password</span>
<span class="sd"> subject: Overrides the default message subject</span>
@@ -1685,7 +1697,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'2.1.0',
VERSION:'2.1.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
+6
View File
@@ -80,6 +80,12 @@ CLI help
--test Do not move or delete IMAP messages
-v, --version show program's version number and exit
SPF and DMARC record validation
===============================
If you are looking for SPF and DMARC record validation and parsing,
check out the sister project, `checkdmarc <https://domainaware.github.io/checkdmarc/>`_.
Sample aggregate report output
==============================
+6 -4
View File
@@ -9,7 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; parsedmarc 2.1.0 documentation</title>
<title>Index &mdash; parsedmarc 2.1.1 documentation</title>
@@ -36,7 +36,7 @@
<link rel="index" title="Index"
href="#"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="parsedmarc 2.1.0 documentation" href="index.html"/>
<link rel="top" title="parsedmarc 2.1.1 documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
@@ -65,7 +65,7 @@
<div class="version">
2.1.0
2.1.1
</div>
@@ -227,6 +227,8 @@
<li><a href="index.html#parsedmarc.parse_report_file">parse_report_file() (in module parsedmarc)</a>
</li>
<li><a href="index.html#parsedmarc.parsed_aggregate_report_to_csv">parsed_aggregate_report_to_csv() (in module parsedmarc)</a>
</li>
<li><a href="index.html#parsedmarc.parsed_dmarc_forensic_reports_to_csv">parsed_dmarc_forensic_reports_to_csv() (in module parsedmarc)</a>
</li>
<li><a href="index.html#module-parsedmarc">parsedmarc (module)</a>
</li>
@@ -291,7 +293,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.1.0',
VERSION:'2.1.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
+32 -7
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to parsedmarcs documentation! &mdash; parsedmarc 2.1.0 documentation</title>
<title>Welcome to parsedmarcs documentation! &mdash; parsedmarc 2.1.1 documentation</title>
@@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="parsedmarc 2.1.0 documentation" href="#"/>
<link rel="top" title="parsedmarc 2.1.1 documentation" href="#"/>
<script src="_static/js/modernizr.min.js"></script>
@@ -64,7 +64,7 @@
<div class="version">
2.1.0
2.1.1
</div>
@@ -93,6 +93,7 @@
<li><a class="reference internal" href="#">Welcome to parsedmarcs documentation!</a><ul>
<li><a class="reference internal" href="#features">Features</a></li>
<li><a class="reference internal" href="#cli-help">CLI help</a></li>
<li><a class="reference internal" href="#spf-and-dmarc-record-validation">SPF and DMARC record validation</a></li>
<li><a class="reference internal" href="#sample-aggregate-report-output">Sample aggregate report output</a><ul>
<li><a class="reference internal" href="#json">JSON</a></li>
<li><a class="reference internal" href="#csv">CSV</a></li>
@@ -244,6 +245,11 @@
</pre></div>
</div>
</div>
<div class="section" id="spf-and-dmarc-record-validation">
<h2>SPF and DMARC record validation<a class="headerlink" href="#spf-and-dmarc-record-validation" title="Permalink to this headline"></a></h2>
<p>If you are looking for SPF and DMARC record validation and parsing,
check out the sister project, <a class="reference external" href="https://domainaware.github.io/checkdmarc/">checkdmarc</a>.</p>
</div>
<div class="section" id="sample-aggregate-report-output">
<h2>Sample aggregate report output<a class="headerlink" href="#sample-aggregate-report-output" title="Permalink to this headline"></a></h2>
<p>Here are the results from parsing the <a class="reference external" href="https://dmarc.org/wiki/FAQ#I_need_to_implement_aggregate_reports.2C_what_do_they_look_like.3F">example</a>
@@ -423,7 +429,7 @@ above commands.</p>
<li><strong>mail_to</strong> A list of addresses to mail to</li>
<li><strong>port</strong> (<em>int</em>) Port to use</li>
<li><strong>starttls</strong> (<em>bool</em>) use STARTTLS</li>
<li><strong>use_ssl</strong> (<em>bool</em>) Require an SSL connection from the start</li>
<li><strong>use_ssl</strong> (<em>bool</em>) Require a SSL connection from the start</li>
<li><strong>user</strong> An optional username</li>
<li><strong>password</strong> An optional password</li>
<li><strong>subject</strong> Overrides the default message subject</li>
@@ -657,14 +663,14 @@ file-like object. or bytes</p>
<dl class="function">
<dt id="parsedmarc.parsed_aggregate_report_to_csv">
<code class="descclassname">parsedmarc.</code><code class="descname">parsed_aggregate_report_to_csv</code><span class="sig-paren">(</span><em>_input</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/parsedmarc.html#parsed_aggregate_report_to_csv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#parsedmarc.parsed_aggregate_report_to_csv" title="Permalink to this definition"></a></dt>
<code class="descclassname">parsedmarc.</code><code class="descname">parsed_aggregate_report_to_csv</code><span class="sig-paren">(</span><em>reports</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/parsedmarc.html#parsed_aggregate_report_to_csv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#parsedmarc.parsed_aggregate_report_to_csv" title="Permalink to this definition"></a></dt>
<dd><p>Converts one or more parsed aggregate reports to flat CSV format, including
headers</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>_input</strong> A parsed aggregate report or list of parsed aggregate reports</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>reports</strong> A parsed aggregate report or list of parsed aggregate reports</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Parsed aggregate report data in flat CSV format, including headers</td>
</tr>
@@ -674,6 +680,25 @@ headers</p>
</table>
</dd></dl>
<dl class="function">
<dt id="parsedmarc.parsed_dmarc_forensic_reports_to_csv">
<code class="descclassname">parsedmarc.</code><code class="descname">parsed_dmarc_forensic_reports_to_csv</code><span class="sig-paren">(</span><em>reports</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/parsedmarc.html#parsed_dmarc_forensic_reports_to_csv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#parsedmarc.parsed_dmarc_forensic_reports_to_csv" title="Permalink to this definition"></a></dt>
<dd><p>Converts one or more parsed forensic reports to flat CSV format, including
headers</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>reports</strong> A parsed forensic report or list of parsed forensic reports</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Parsed forensic report data in flat CSV format, including headers</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="parsedmarc.save_output">
<code class="descclassname">parsedmarc.</code><code class="descname">save_output</code><span class="sig-paren">(</span><em>results</em>, <em>output_directory='output'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/parsedmarc.html#save_output"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#parsedmarc.save_output" title="Permalink to this definition"></a></dt>
@@ -767,7 +792,7 @@ to a callback function</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.1.0',
VERSION:'2.1.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
BIN
View File
Binary file not shown.
+4 -4
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python Module Index &mdash; parsedmarc 2.1.0 documentation</title>
<title>Python Module Index &mdash; parsedmarc 2.1.1 documentation</title>
@@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="parsedmarc 2.1.0 documentation" href="index.html"/>
<link rel="top" title="parsedmarc 2.1.1 documentation" href="index.html"/>
<script type="text/javascript">
@@ -71,7 +71,7 @@
<div class="version">
2.1.0
2.1.1
</div>
@@ -209,7 +209,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.1.0',
VERSION:'2.1.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
+4 -4
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search &mdash; parsedmarc 2.1.0 documentation</title>
<title>Search &mdash; parsedmarc 2.1.1 documentation</title>
@@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="#"/>
<link rel="top" title="parsedmarc 2.1.0 documentation" href="index.html"/>
<link rel="top" title="parsedmarc 2.1.1 documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
@@ -64,7 +64,7 @@
<div class="version">
2.1.0
2.1.1
</div>
@@ -195,7 +195,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.1.0',
VERSION:'2.1.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
+1 -1
View File
@@ -1 +1 @@
Search.setIndex({docnames:["index"],envversion:53,filenames:["index.rst"],objects:{"":{parsedmarc:[0,0,0,"-"]},parsedmarc:{IMAPError:[0,1,1,""],InvalidAggregateReport:[0,1,1,""],InvalidDMARCReport:[0,1,1,""],InvalidForensicReport:[0,1,1,""],ParserError:[0,1,1,""],SMTPError:[0,1,1,""],email_results:[0,2,1,""],extract_xml:[0,2,1,""],get_dmarc_reports_from_inbox:[0,2,1,""],get_report_zip:[0,2,1,""],human_timestamp_to_datetime:[0,2,1,""],parse_aggregate_report_file:[0,2,1,""],parse_aggregate_report_xml:[0,2,1,""],parse_forensic_report:[0,2,1,""],parse_report_email:[0,2,1,""],parse_report_file:[0,2,1,""],parsed_aggregate_report_to_csv:[0,2,1,""],save_output:[0,2,1,""],watch_inbox:[0,2,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","exception","Python exception"],"2":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:exception","2":"py:function"},terms:{"byte":0,"default":0,"float":0,"function":0,"int":0,"null":0,"return":0,"true":0,DNS:0,OLE:0,The:0,Use:0,_input:0,abl:0,abov:0,acm:0,actual:0,address:0,adkim:0,administr:0,adsl:0,after:0,aggreg:[],aggregate_report:0,ani:[],answer:0,appendix:0,apt:0,archiv:0,archive_fold:0,argument:0,arriv:0,aspf:0,attach:0,attachment_filenam:0,auth_result:0,base_domain:0,begin_d:0,bellsouth:0,bodi:0,bool:0,callback:0,can:0,check:[],checkdmarc:[],com:0,command:0,compress:0,connect:0,consist:0,contact:0,content:[],context:0,convert:0,count:0,countri:0,creat:0,data:0,datetim:0,debian:0,delet:0,develop:0,directli:0,directori:0,disposit:0,dkim:0,dkim_align:0,dkim_domain:0,dkim_result:0,dkim_selector:0,dmarc:0,dns_timeout:0,domain:0,domainawar:0,don:0,download:0,draft:0,email:0,email_result:0,encount:0,end_dat:0,envelope_from:0,envelope_to:0,error:0,even:0,exampl:0,except:0,exit:0,extract:0,extract_xml:0,fail:0,fals:0,feedback:0,feedback_report:0,fetch:0,few:[],file:0,file_path:0,filenam:0,flat:0,folder:0,forensic_report:0,format:0,found:0,from:0,get:0,get_dmarc_reports_from_inbox:0,get_report_zip:0,git:0,github:0,given:0,gzip:0,handl:0,have:0,header:0,header_from:0,here:0,host:0,hostnam:0,http:0,human:0,human_timestamp:0,human_timestamp_to_datetim:0,identifi:0,idl:0,imap:0,imaperror:0,inbox:0,includ:0,incom:0,index:0,input:0,input_:0,invalid:0,invalidaggregatereport:0,invaliddmarcreport:0,invalidforensicreport:0,ip_address:0,issu:0,latest:0,libemail:0,like:0,linux:0,list:0,maco:0,mail:0,mail_from:0,mail_to:0,messag:0,mfrom:0,microsoft:0,modul:0,more:0,move:0,msg:0,msgconvert:0,nameserv:0,net:0,none:0,norepli:0,normal:0,number:0,object:0,occur:0,often:[],older:0,one:0,onli:0,option:[],ordereddict:0,org:0,org_email:0,org_extra_contact_info:0,org_nam:0,outgo:0,outgoing_attach:0,outgoing_from:0,outgoing_host:0,outgoing_messag:0,outgoing_password:0,outgoing_subject:0,outgoing_to:0,outgoing_us:0,outlook:0,output_directori:0,over:0,overrid:0,page:0,paramet:0,pars:0,parse_aggregate_report_fil:0,parse_aggregate_report_xml:0,parse_forensic_report:0,parse_report_email:0,parse_report_fil:0,parsed_aggregate_report_to_csv:0,parser:0,parsererror:0,pasedmarc:0,pass:0,password:0,patch:0,path:0,pct:0,perl:0,pip3:0,pip:0,place:0,plain:0,pleas:0,policy_evalu:0,policy_override_com:0,policy_override_reason:0,policy_publish:0,port:0,posit:0,prefer:0,print:[],privaci:0,process:0,produc:0,program:0,provid:[],publicli:0,python3:0,python:0,queri:0,rais:0,rather:[],readabl:0,reason:0,receiv:0,recipi:[],record:0,regardless:0,releas:0,report_id:0,report_metadata:0,report_typ:0,requir:0,respons:0,result:0,reverse_dn:0,rfc:0,run:0,sample_headers_onli:0,save:0,save_output:0,schema:0,scope:0,screen:[],search:0,second:0,selector:0,send:[],server:0,set:0,share:0,show:0,shv:0,simpl:0,simpli:0,smtp:0,smtperror:0,some:0,sourc:0,source_base_domain:0,source_countri:0,source_ip_address:0,source_reverse_dn:0,specifi:0,spf:0,spf_align:0,spf_domain:0,spf_result:0,spf_scope:0,ssl:0,ssl_context:0,stabl:0,standard:0,start:0,starttl:0,still:0,str:0,string:0,structur:0,subject:0,substitut:0,sudo:0,support:0,system:0,test:0,text:0,than:[],thei:0,them:0,thi:0,those:[],timeout:0,timestamp:0,tracker:0,transpar:0,type:0,ubuntu:0,uncompress:0,upgrad:0,usag:0,use:0,use_ssl:0,user:0,usernam:0,using:0,util:0,valu:0,veri:[],version:0,wait:0,watch_inbox:0,when:0,whenev:0,who:[],wide:0,wiki:0,window:0,work:0,would:0,write:0,www:0,xml:0,xml_schema:0,you:0,yyyi:0,zip:0},titles:["Welcome to parsedmarc\u2019s documentation!"],titleterms:{about:[],aggreg:0,api:0,bug:0,cli:0,csv:0,depend:0,dmarc:[],document:0,featur:0,forens:0,help:0,indic:0,instal:0,json:0,option:0,output:0,parsedmarc:0,report:0,sampl:0,tabl:0,welcom:0,what:[]}})
Search.setIndex({docnames:["index"],envversion:53,filenames:["index.rst"],objects:{"":{parsedmarc:[0,0,0,"-"]},parsedmarc:{IMAPError:[0,1,1,""],InvalidAggregateReport:[0,1,1,""],InvalidDMARCReport:[0,1,1,""],InvalidForensicReport:[0,1,1,""],ParserError:[0,1,1,""],SMTPError:[0,1,1,""],email_results:[0,2,1,""],extract_xml:[0,2,1,""],get_dmarc_reports_from_inbox:[0,2,1,""],get_report_zip:[0,2,1,""],human_timestamp_to_datetime:[0,2,1,""],parse_aggregate_report_file:[0,2,1,""],parse_aggregate_report_xml:[0,2,1,""],parse_forensic_report:[0,2,1,""],parse_report_email:[0,2,1,""],parse_report_file:[0,2,1,""],parsed_aggregate_report_to_csv:[0,2,1,""],parsed_dmarc_forensic_reports_to_csv:[0,2,1,""],save_output:[0,2,1,""],watch_inbox:[0,2,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","exception","Python exception"],"2":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:exception","2":"py:function"},terms:{"byte":0,"default":0,"float":0,"function":0,"int":0,"null":0,"return":0,"true":0,DNS:0,OLE:0,The:0,Use:0,_input:0,abl:0,abov:0,acm:0,actual:0,address:0,adkim:0,administr:0,adsl:0,after:0,aggreg:[],aggregate_report:0,ani:[],answer:0,appendix:0,apt:0,archiv:0,archive_fold:0,argument:0,arriv:0,aspf:0,attach:0,attachment_filenam:0,auth_result:0,base_domain:0,begin_d:0,bellsouth:0,bodi:0,bool:0,callback:0,can:0,check:0,checkdmarc:0,com:0,command:0,compress:0,connect:0,consist:0,contact:0,content:[],context:0,convert:0,count:0,countri:0,creat:0,data:0,datetim:0,debian:0,delet:0,develop:0,directli:0,directori:0,disposit:0,dkim:0,dkim_align:0,dkim_domain:0,dkim_result:0,dkim_selector:0,dmarc:[],dns_timeout:0,domain:0,domainawar:0,don:0,download:0,draft:0,email:0,email_result:0,encount:0,end_dat:0,envelope_from:0,envelope_to:0,error:0,even:0,exampl:0,except:0,exit:0,extract:0,extract_xml:0,fail:0,fals:0,feedback:0,feedback_report:0,fetch:0,few:[],file:0,file_path:0,filenam:0,flat:0,folder:0,forensic_report:0,format:0,found:0,from:0,get:0,get_dmarc_reports_from_inbox:0,get_report_zip:0,git:0,github:0,given:0,gzip:0,handl:0,have:0,header:0,header_from:0,here:0,host:0,hostnam:0,http:0,human:0,human_timestamp:0,human_timestamp_to_datetim:0,identifi:0,idl:0,imap:0,imaperror:0,inbox:0,includ:0,incom:0,index:0,input:0,input_:0,invalid:0,invalidaggregatereport:0,invaliddmarcreport:0,invalidforensicreport:0,ip_address:0,issu:0,latest:0,libemail:0,like:0,linux:0,list:0,look:0,maco:0,mail:0,mail_from:0,mail_to:0,messag:0,mfrom:0,microsoft:0,modul:0,more:0,move:0,msg:0,msgconvert:0,nameserv:0,net:0,none:0,norepli:0,normal:0,number:0,object:0,occur:0,often:[],older:0,one:0,onli:0,option:[],ordereddict:0,org:0,org_email:0,org_extra_contact_info:0,org_nam:0,out:0,outgo:0,outgoing_attach:0,outgoing_from:0,outgoing_host:0,outgoing_messag:0,outgoing_password:0,outgoing_subject:0,outgoing_to:0,outgoing_us:0,outlook:0,output_directori:0,over:0,overrid:0,page:0,paramet:0,pars:0,parse_aggregate_report_fil:0,parse_aggregate_report_xml:0,parse_forensic_report:0,parse_report_email:0,parse_report_fil:0,parsed_aggregate_report_to_csv:0,parsed_dmarc_forensic_reports_to_csv:0,parser:0,parsererror:0,pasedmarc:0,pass:0,password:0,patch:0,path:0,pct:0,perl:0,pip3:0,pip:0,place:0,plain:0,pleas:0,policy_evalu:0,policy_override_com:0,policy_override_reason:0,policy_publish:0,port:0,posit:0,prefer:0,print:[],privaci:0,process:0,produc:0,program:0,project:0,provid:[],publicli:0,python3:0,python:0,queri:0,rais:0,rather:[],readabl:0,reason:0,receiv:0,recipi:[],record:[],regardless:0,releas:0,report_id:0,report_metadata:0,report_typ:0,requir:0,respons:0,result:0,reverse_dn:0,rfc:0,run:0,sample_headers_onli:0,save:0,save_output:0,schema:0,scope:0,screen:[],search:0,second:0,selector:0,send:[],server:0,set:0,share:0,show:0,shv:0,simpl:0,simpli:0,sister:0,smtp:0,smtperror:0,some:0,sourc:0,source_base_domain:0,source_countri:0,source_ip_address:0,source_reverse_dn:0,specifi:0,spf:[],spf_align:0,spf_domain:0,spf_result:0,spf_scope:0,ssl:0,ssl_context:0,stabl:0,standard:0,start:0,starttl:0,still:0,str:0,string:0,structur:0,subject:0,substitut:0,sudo:0,support:0,system:0,test:0,text:0,than:[],thei:0,them:0,thi:0,those:[],timeout:0,timestamp:0,tracker:0,transpar:0,type:0,ubuntu:0,uncompress:0,upgrad:0,usag:0,use:0,use_ssl:0,user:0,usernam:0,using:0,util:0,valu:0,veri:[],version:0,wait:0,watch_inbox:0,when:0,whenev:0,who:[],wide:0,wiki:0,window:0,work:0,would:0,write:0,www:0,xml:0,xml_schema:0,you:0,yyyi:0,zip:0},titles:["Welcome to parsedmarc\u2019s documentation!"],titleterms:{about:[],aggreg:0,api:0,bug:0,cli:0,csv:0,depend:0,dmarc:0,document:0,featur:0,forens:0,help:0,indic:0,instal:0,json:0,option:0,output:0,parsedmarc:0,record:0,report:0,sampl:0,spf:0,tabl:0,valid:0,welcom:0,what:[]}})