mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-05 11:35:25 +00:00
Update docs
This commit is contained in:
@@ -143,49 +143,42 @@ More information about `geoipupdate` can be found at the
|
||||
On Debian or Ubuntu systems, run:
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y python3-pip python3-virtualenv python3-dev libxml2-dev libxslt-dev
|
||||
sudo apt-get install -y python3-pip python3-venv python3-dev libxml2-dev libxslt-dev
|
||||
```
|
||||
|
||||
On CentOS or RHEL systems, run:
|
||||
|
||||
```bash
|
||||
sudo dnf install -y python39 python3-virtualenv python3-setuptools python3-devel libxml2-devel libxslt-devel
|
||||
sudo dnf install -y python3 python3-pip python3-devel libxml2-devel libxslt-devel
|
||||
```
|
||||
|
||||
Python 3 installers for Windows and macOS can be found at
|
||||
<https://www.python.org/downloads/>.
|
||||
|
||||
Create a system user
|
||||
`parsedmarc` requires Python 3.10 or newer. If your distribution's
|
||||
default `python3` is older, install a newer interpreter (e.g.
|
||||
`python3.12`) and substitute it for `python3` in the commands below.
|
||||
|
||||
Create a dedicated system user, with `/opt/parsedmarc` as its home
|
||||
directory so the directory is created with the correct ownership in
|
||||
the same step
|
||||
|
||||
```bash
|
||||
sudo mkdir /opt
|
||||
sudo useradd parsedmarc -r -s /bin/false -m -b /opt
|
||||
sudo useradd --system --create-home --home-dir /opt/parsedmarc \
|
||||
--shell /usr/sbin/nologin --skel /dev/null parsedmarc
|
||||
```
|
||||
|
||||
Install parsedmarc in a virtualenv
|
||||
Create a virtualenv and install `parsedmarc` into it as that user, so
|
||||
any files created later are also owned by `parsedmarc`
|
||||
|
||||
```bash
|
||||
sudo -u parsedmarc virtualenv /opt/parsedmarc/venv
|
||||
sudo -u parsedmarc python3 -m venv /opt/parsedmarc/venv
|
||||
sudo -u parsedmarc /opt/parsedmarc/venv/bin/pip install --upgrade pip
|
||||
sudo -u parsedmarc /opt/parsedmarc/venv/bin/pip install --upgrade parsedmarc
|
||||
```
|
||||
|
||||
CentOS/RHEL 8 systems use Python 3.6 by default, so on those systems
|
||||
explicitly tell `virtualenv` to use `python3.10` instead
|
||||
|
||||
```bash
|
||||
sudo -u parsedmarc virtualenv -p python3.10 /opt/parsedmarc/venv
|
||||
```
|
||||
|
||||
Activate the virtualenv
|
||||
|
||||
```bash
|
||||
source /opt/parsedmarc/venv/bin/activate
|
||||
```
|
||||
|
||||
To install or upgrade `parsedmarc` inside the virtualenv, run:
|
||||
|
||||
```bash
|
||||
sudo -u parsedmarc /opt/parsedmarc/venv/bin/pip install -U parsedmarc
|
||||
```
|
||||
To upgrade `parsedmarc` later, re-run the last command above and then
|
||||
restart the service.
|
||||
|
||||
## Optional dependencies
|
||||
|
||||
|
||||
+3
-20
@@ -690,26 +690,9 @@ When configured correctly, if ParseDMARC finds that a report is related to a dom
|
||||
Use systemd to run `parsedmarc` as a service and process reports as
|
||||
they arrive.
|
||||
|
||||
Create a dedicated system user and group, with `/opt/parsedmarc` as
|
||||
its home directory so the directory is created with the correct
|
||||
ownership in the same step
|
||||
|
||||
```bash
|
||||
sudo useradd --system --create-home --home-dir /opt/parsedmarc \
|
||||
--shell /usr/sbin/nologin --skel /dev/null parsedmarc
|
||||
```
|
||||
|
||||
Create a virtualenv and install `parsedmarc` into it as that user so
|
||||
any files created later are also owned by `parsedmarc`
|
||||
|
||||
```bash
|
||||
sudo -u parsedmarc python3 -m venv /opt/parsedmarc/venv
|
||||
sudo -u parsedmarc /opt/parsedmarc/venv/bin/pip install --upgrade pip
|
||||
sudo -u parsedmarc /opt/parsedmarc/venv/bin/pip install --upgrade parsedmarc
|
||||
```
|
||||
|
||||
To upgrade `parsedmarc` later, re-run the last `pip install --upgrade`
|
||||
command above and then restart the service.
|
||||
This assumes `parsedmarc` has been installed into
|
||||
`/opt/parsedmarc/venv` under a `parsedmarc` system user, as described
|
||||
in [Installing parsedmarc](installation.md#installing-parsedmarc).
|
||||
|
||||
Protect the `parsedmarc` configuration file from prying eyes
|
||||
|
||||
|
||||
+17
-20
@@ -212,37 +212,34 @@ job or scheduled task.</p>
|
||||
<section id="installing-parsedmarc">
|
||||
<h2>Installing parsedmarc<a class="headerlink" href="#installing-parsedmarc" title="Link to this heading"></a></h2>
|
||||
<p>On Debian or Ubuntu systems, run:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span>python3-pip<span class="w"> </span>python3-virtualenv<span class="w"> </span>python3-dev<span class="w"> </span>libxml2-dev<span class="w"> </span>libxslt-dev
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span>python3-pip<span class="w"> </span>python3-venv<span class="w"> </span>python3-dev<span class="w"> </span>libxml2-dev<span class="w"> </span>libxslt-dev
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>On CentOS or RHEL systems, run:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span>python39<span class="w"> </span>python3-virtualenv<span class="w"> </span>python3-setuptools<span class="w"> </span>python3-devel<span class="w"> </span>libxml2-devel<span class="w"> </span>libxslt-devel
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span>python3<span class="w"> </span>python3-pip<span class="w"> </span>python3-devel<span class="w"> </span>libxml2-devel<span class="w"> </span>libxslt-devel
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Python 3 installers for Windows and macOS can be found at
|
||||
<a class="reference external" href="https://www.python.org/downloads/">https://www.python.org/downloads/</a>.</p>
|
||||
<p>Create a system user</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>mkdir<span class="w"> </span>/opt
|
||||
sudo<span class="w"> </span>useradd<span class="w"> </span>parsedmarc<span class="w"> </span>-r<span class="w"> </span>-s<span class="w"> </span>/bin/false<span class="w"> </span>-m<span class="w"> </span>-b<span class="w"> </span>/opt
|
||||
<p><code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> requires Python 3.10 or newer. If your distribution’s
|
||||
default <code class="docutils literal notranslate"><span class="pre">python3</span></code> is older, install a newer interpreter (e.g.
|
||||
<code class="docutils literal notranslate"><span class="pre">python3.12</span></code>) and substitute it for <code class="docutils literal notranslate"><span class="pre">python3</span></code> in the commands below.</p>
|
||||
<p>Create a dedicated system user, with <code class="docutils literal notranslate"><span class="pre">/opt/parsedmarc</span></code> as its home
|
||||
directory so the directory is created with the correct ownership in
|
||||
the same step</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>useradd<span class="w"> </span>--system<span class="w"> </span>--create-home<span class="w"> </span>--home-dir<span class="w"> </span>/opt/parsedmarc<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--shell<span class="w"> </span>/usr/sbin/nologin<span class="w"> </span>--skel<span class="w"> </span>/dev/null<span class="w"> </span>parsedmarc
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Install parsedmarc in a virtualenv</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-u<span class="w"> </span>parsedmarc<span class="w"> </span>virtualenv<span class="w"> </span>/opt/parsedmarc/venv
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>CentOS/RHEL 8 systems use Python 3.6 by default, so on those systems
|
||||
explicitly tell <code class="docutils literal notranslate"><span class="pre">virtualenv</span></code> to use <code class="docutils literal notranslate"><span class="pre">python3.10</span></code> instead</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-u<span class="w"> </span>parsedmarc<span class="w"> </span>virtualenv<span class="w"> </span>-p<span class="w"> </span>python3.10<span class="w"> </span>/opt/parsedmarc/venv
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Activate the virtualenv</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">source</span><span class="w"> </span>/opt/parsedmarc/venv/bin/activate
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>To install or upgrade <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> inside the virtualenv, run:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-u<span class="w"> </span>parsedmarc<span class="w"> </span>/opt/parsedmarc/venv/bin/pip<span class="w"> </span>install<span class="w"> </span>-U<span class="w"> </span>parsedmarc
|
||||
<p>Create a virtualenv and install <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> into it as that user, so
|
||||
any files created later are also owned by <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code></p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-u<span class="w"> </span>parsedmarc<span class="w"> </span>python3<span class="w"> </span>-m<span class="w"> </span>venv<span class="w"> </span>/opt/parsedmarc/venv
|
||||
sudo<span class="w"> </span>-u<span class="w"> </span>parsedmarc<span class="w"> </span>/opt/parsedmarc/venv/bin/pip<span class="w"> </span>install<span class="w"> </span>--upgrade<span class="w"> </span>pip
|
||||
sudo<span class="w"> </span>-u<span class="w"> </span>parsedmarc<span class="w"> </span>/opt/parsedmarc/venv/bin/pip<span class="w"> </span>install<span class="w"> </span>--upgrade<span class="w"> </span>parsedmarc
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>To upgrade <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> later, re-run the last command above and then
|
||||
restart the service.</p>
|
||||
</section>
|
||||
<section id="optional-dependencies">
|
||||
<h2>Optional dependencies<a class="headerlink" href="#optional-dependencies" title="Link to this heading"></a></h2>
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+3
-16
@@ -852,22 +852,9 @@ high-volume mailbox processing.</p>
|
||||
<h2>Running parsedmarc as a systemd service<a class="headerlink" href="#running-parsedmarc-as-a-systemd-service" title="Link to this heading"></a></h2>
|
||||
<p>Use systemd to run <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> as a service and process reports as
|
||||
they arrive.</p>
|
||||
<p>Create a dedicated system user and group, with <code class="docutils literal notranslate"><span class="pre">/opt/parsedmarc</span></code> as
|
||||
its home directory so the directory is created with the correct
|
||||
ownership in the same step</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>useradd<span class="w"> </span>--system<span class="w"> </span>--create-home<span class="w"> </span>--home-dir<span class="w"> </span>/opt/parsedmarc<span class="w"> </span><span class="se">\</span>
|
||||
<span class="w"> </span>--shell<span class="w"> </span>/usr/sbin/nologin<span class="w"> </span>--skel<span class="w"> </span>/dev/null<span class="w"> </span>parsedmarc
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Create a virtualenv and install <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> into it as that user so
|
||||
any files created later are also owned by <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code></p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-u<span class="w"> </span>parsedmarc<span class="w"> </span>python3<span class="w"> </span>-m<span class="w"> </span>venv<span class="w"> </span>/opt/parsedmarc/venv
|
||||
sudo<span class="w"> </span>-u<span class="w"> </span>parsedmarc<span class="w"> </span>/opt/parsedmarc/venv/bin/pip<span class="w"> </span>install<span class="w"> </span>--upgrade<span class="w"> </span>pip
|
||||
sudo<span class="w"> </span>-u<span class="w"> </span>parsedmarc<span class="w"> </span>/opt/parsedmarc/venv/bin/pip<span class="w"> </span>install<span class="w"> </span>--upgrade<span class="w"> </span>parsedmarc
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>To upgrade <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> later, re-run the last <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">--upgrade</span></code>
|
||||
command above and then restart the service.</p>
|
||||
<p>This assumes <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> has been installed into
|
||||
<code class="docutils literal notranslate"><span class="pre">/opt/parsedmarc/venv</span></code> under a <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> system user, as described
|
||||
in <a class="reference internal" href="installation.html#installing-parsedmarc"><span class="std std-ref">Installing parsedmarc</span></a>.</p>
|
||||
<p>Protect the <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> configuration file from prying eyes</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>chown<span class="w"> </span>root:parsedmarc<span class="w"> </span>/etc/parsedmarc.ini
|
||||
sudo<span class="w"> </span>chmod<span class="w"> </span><span class="nv">u</span><span class="o">=</span>rw,g<span class="o">=</span>r,o<span class="o">=</span><span class="w"> </span>/etc/parsedmarc.ini
|
||||
|
||||
Reference in New Issue
Block a user