File: //usr/share/doc/python3-aiosmtpd/html/index.html
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>aiosmtpd - An asyncio based SMTP server — aiosmtpd 1.4.4.post2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=86f27845" />
<link rel="stylesheet" type="text/css" href="_static/aiosmtpd.css?v=4cc6bf70" />
<script src="_static/jquery.js?v=8dae8fb0"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=ad49bbf5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Introduction" href="intro.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="#" class="icon icon-home">
aiosmtpd
</a>
<div class="version">
1.4.4.post2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="concepts.html">Concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="cli.html">Command line usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="controller.html">Programmatic usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="smtp.html">The SMTP Module</a></li>
<li class="toctree-l1"><a class="reference internal" href="lmtp.html">The LMTP class</a></li>
<li class="toctree-l1"><a class="reference internal" href="handlers.html">Handlers</a></li>
<li class="toctree-l1"><a class="reference internal" href="auth.html">Authentication System</a></li>
<li class="toctree-l1"><a class="reference internal" href="proxyprotocol.html">PROXY Protocol Support</a></li>
<li class="toctree-l1"><a class="reference internal" href="migrating.html">Migrating from smtpd to aiosmtpd</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="manpage.html">aiosmtpd</a></li>
<li class="toctree-l1"><a class="reference internal" href="NEWS.html">NEWS for aiosmtpd</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">aiosmtpd</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="#" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">aiosmtpd - An asyncio based SMTP server</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="aiosmtpd-an-asyncio-based-smtp-server">
<h1>aiosmtpd - An asyncio based SMTP server<a class="headerlink" href="#aiosmtpd-an-asyncio-based-smtp-server" title="Link to this heading"></a></h1>
<div class="line-block">
<div class="line"><a href="#id1"><span class="problematic" id="id2">|github license|</span></a> <a href="#id3"><span class="problematic" id="id4">|PyPI Version|</span></a> <a href="#id5"><span class="problematic" id="id6">|PyPI Python|</span></a> <a href="#id7"><span class="problematic" id="id8">|PyPI PythonImpl|</span></a></div>
<div class="line"><a href="#id9"><span class="problematic" id="id10">|GA badge|</span></a> <a href="#id11"><span class="problematic" id="id12">|CodeQL badge|</span></a> <a href="#id13"><span class="problematic" id="id14">|codecov|</span></a> <a href="#id15"><span class="problematic" id="id16">|readthedocs|</span></a></div>
<div class="line"><br /></div>
<div class="line"><a href="#id17"><span class="problematic" id="id18">|GH Discussions|</span></a></div>
<div class="line"><br /></div>
</div>
<p>The Python standard library includes a basic <a class="reference external" href="https://tools.ietf.org/html/rfc5321"><strong>SMTP</strong></a> server in the <a class="reference external" href="https://docs.python.org/3/library/smtpd.html"><strong>smtpd</strong></a> module,
based on the old asynchronous libraries <a class="reference external" href="https://docs.python.org/3/library/asyncore.html"><code class="docutils literal notranslate"><span class="pre">asyncore</span></code></a> and <a class="reference external" href="https://docs.python.org/3/library/asynchat.html"><code class="docutils literal notranslate"><span class="pre">asynchat</span></code></a>.
These modules are quite old and are definitely showing their age;
<code class="docutils literal notranslate"><span class="pre">asyncore</span></code> and <code class="docutils literal notranslate"><span class="pre">asynchat</span></code> are difficult APIs to work with, understand, extend, and fix.
(And have been deprecated since Python 3.6, and will be removed in Python 3.12.)</p>
<p>With the introduction of the <a class="reference external" href="https://docs.python.org/3/library/asyncio.html"><code class="docutils literal notranslate"><span class="pre">asyncio</span></code></a> module in Python 3.4,
a much better way of doing asynchronous I/O is now available.
It seems obvious that an asyncio-based version of the SMTP and related protocols are needed for Python 3.
This project brings together several highly experienced Python developers collaborating on this reimplementation.</p>
<p>This package provides such an implementation of both the SMTP and LMTP protocols.</p>
<p>Full documentation is available on <a class="reference external" href="https://aiosmtpd.readthedocs.io"><strong>aiosmtpd.readthedocs.io</strong></a></p>
<section id="requirements">
<h2>Requirements<a class="headerlink" href="#requirements" title="Link to this heading"></a></h2>
<p>You need <strong>at least Python 3.7</strong> to use this library.</p>
<section id="supported-platforms">
<h3>Supported Platforms<a class="headerlink" href="#supported-platforms" title="Link to this heading"></a></h3>
<p><code class="docutils literal notranslate"><span class="pre">aiosmtpd</span></code> has been tested on <strong>CPython</strong>>=3.7 and <a class="reference external" href="https://www.pypy.org/"><strong>PyPy</strong></a>>=3.7
for the following platforms (in alphabetical order):</p>
<ul class="simple">
<li><p>Cygwin (as of 2022-12-22, only for CPython 3.7, 3.8, and 3.9)</p></li>
<li><p>MacOS 11 and 12</p></li>
<li><p>Ubuntu 18.04</p></li>
<li><p>Ubuntu 20.04</p></li>
<li><p>Ubuntu 22.04</p></li>
<li><p>Windows 10</p></li>
<li><p>Windows Server 2019</p></li>
<li><p>Windows Server 2022</p></li>
</ul>
<p><code class="docutils literal notranslate"><span class="pre">aiosmtpd</span></code> <em>probably</em> can run on platforms not listed above,
but we cannot provide support for unlisted platforms.</p>
</section>
</section>
<section id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Link to this heading"></a></h2>
<p>Install as usual with <code class="docutils literal notranslate"><span class="pre">pip</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">aiosmtpd</span>
</pre></div>
</div>
<p>If you receive an error message <code class="docutils literal notranslate"><span class="pre">ModuleNotFoundError:</span> <span class="pre">No</span> <span class="pre">module</span> <span class="pre">named</span> <span class="pre">'public'</span></code>,
it likely means your <code class="docutils literal notranslate"><span class="pre">setuptools</span></code> is too old;
try to upgrade <code class="docutils literal notranslate"><span class="pre">setuptools</span></code> to at least version <code class="docutils literal notranslate"><span class="pre">46.4.0</span></code>
which had <a class="reference external" href="https://setuptools.readthedocs.io/en/latest/history.html#v46-4-0">implemented a fix for this issue</a>.</p>
</section>
<section id="project-details">
<h2>Project details<a class="headerlink" href="#project-details" title="Link to this heading"></a></h2>
<p>As of 2016-07-14, aiosmtpd has been put under the <a class="reference external" href="https://github.com/aio-libs"><strong>aio-libs</strong></a> umbrella project
and moved to GitHub.</p>
<ul class="simple">
<li><p>Project home: <a class="reference external" href="https://github.com/aio-libs/aiosmtpd">https://github.com/aio-libs/aiosmtpd</a></p></li>
<li><p>PyPI project page: <a class="reference external" href="https://pypi.org/project/aiosmtpd/">https://pypi.org/project/aiosmtpd/</a></p></li>
<li><p>Report bugs at: <a class="reference external" href="https://github.com/aio-libs/aiosmtpd/issues">https://github.com/aio-libs/aiosmtpd/issues</a></p></li>
<li><p>Git clone: <a class="reference external" href="https://github.com/aio-libs/aiosmtpd.git">https://github.com/aio-libs/aiosmtpd.git</a></p></li>
<li><p>Documentation: <a class="reference external" href="http://aiosmtpd.readthedocs.io/">http://aiosmtpd.readthedocs.io/</a></p></li>
<li><p>StackOverflow: <a class="reference external" href="https://stackoverflow.com/questions/tagged/aiosmtpd">https://stackoverflow.com/questions/tagged/aiosmtpd</a></p></li>
</ul>
<p>The best way to contact the developers is through the GitHub links above.
You can also request help by submitting a question on StackOverflow.</p>
</section>
<section id="building">
<h2>Building<a class="headerlink" href="#building" title="Link to this heading"></a></h2>
<p>You can install this package in a virtual environment like so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ python3 -m venv /path/to/venv
$ source /path/to/venv/bin/activate
$ python setup.py install
</pre></div>
</div>
<p>This will give you a command line script called <code class="docutils literal notranslate"><span class="pre">aiosmtpd</span></code> which implements the
SMTP server. Use <code class="docutils literal notranslate"><span class="pre">aiosmtpd</span> <span class="pre">--help</span></code> for a quick reference.</p>
<p>You will also have access to the <code class="docutils literal notranslate"><span class="pre">aiosmtpd</span></code> library, which you can use as a
testing environment for your SMTP clients. See the documentation links above
for details.</p>
</section>
<section id="developing">
<h2>Developing<a class="headerlink" href="#developing" title="Link to this heading"></a></h2>
<p>You’ll need the <a class="reference external" href="https://pypi.python.org/pypi/tox">tox</a> tool to run the
test suite for Python 3. Once you’ve got that, run:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ tox
</pre></div>
</div>
<p>Individual tests can be run like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ tox -- <testname>
</pre></div>
</div>
<p>where <code class="docutils literal notranslate"><span class="pre"><testname></span></code> is the “node id” of the test case to run, as explained
in <a class="reference external" href="https://docs.pytest.org/en/stable/usage.html#specifying-tests-selecting-tests">the pytest documentation</a>. The command above will run that one test case
against all testenvs defined in <code class="docutils literal notranslate"><span class="pre">tox.ini</span></code> (see below).</p>
<p>If you want test to stop as soon as it hit a failure, use the <code class="docutils literal notranslate"><span class="pre">-x</span></code>/<code class="docutils literal notranslate"><span class="pre">--exitfirst</span></code>
option:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ tox -- -x
</pre></div>
</div>
<p>You can also add the <code class="docutils literal notranslate"><span class="pre">-s</span></code>/<code class="docutils literal notranslate"><span class="pre">--capture=no</span></code> option to show output, e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ tox -e py37-nocov -- -s
</pre></div>
</div>
<p>and these options can be combined:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ tox -e py37-nocov -- -x -s <testname>
</pre></div>
</div>
<p>(The <code class="docutils literal notranslate"><span class="pre">-e</span></code> parameter is explained in the next section about ‘testenvs’.
In general, you’ll want to choose the <code class="docutils literal notranslate"><span class="pre">nocov</span></code> testenvs if you want to show output,
so you can see which test is generating which output.)</p>
<section id="supported-testenvs">
<h3>Supported ‘testenvs’<a class="headerlink" href="#supported-testenvs" title="Link to this heading"></a></h3>
<p>In general, the <code class="docutils literal notranslate"><span class="pre">-e</span></code> parameter to tox specifies one (or more) <strong>testenv</strong>
to run (separate using comma if more than one testenv). The following testenvs
have been configured and tested:</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">{py37,py38,py39,py310,py311,pypy3,pypy37,pypy38,pypy39}-{nocov,cov,diffcov,profile}</span></code></p>
<p>Specifies the interpreter to run and the kind of testing to perform.</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">nocov</span></code> = no coverage testing. Tests will run verbosely.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cov</span></code> = with coverage testing. Tests will run in brief mode
(showing a single character per test run)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">diffcov</span></code> = with diff-coverage report (showing difference in
coverage compared to previous commit). Tests will run in brief mode</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">profile</span></code> = no coverage testing, but code profiling instead.
This must be <strong>invoked manually</strong> using the <code class="docutils literal notranslate"><span class="pre">-e</span></code> parameter</p></li>
</ul>
<p><strong>Note 1:</strong> As of 2021-02-23,
only the <code class="docutils literal notranslate"><span class="pre">{py37,py38,py39}-{nocov,cov}</span></code> combinations work on <strong>Cygwin</strong>.</p>
<p><strong>Note 2:</strong> It is also possible to use whatever Python version is used when
invoking <code class="docutils literal notranslate"><span class="pre">tox</span></code> by using the <code class="docutils literal notranslate"><span class="pre">py</span></code> target, but you must explicitly include
the type of testing you want. For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ tox -e "py-{nocov,cov,diffcov}"
</pre></div>
</div>
<p>(Don’t forget the quotes if you want to use braces!)</p>
<p>You might want to do this for CI platforms where the exact Python version
is pre-prepared, such as Travis CI or <a class="reference external" href="https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python#running-tests-with-tox"><strong>GitHub Actions</strong></a>; this will definitely
save some time during tox’s testenv prepping.</p>
<p>For all testenv combinations except diffcov,
<a class="reference external" href="https://github.com/PyCQA/bandit"><code class="docutils literal notranslate"><span class="pre">bandit</span></code></a> security check will also be run prior to running pytest.</p>
</li>
</ul>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">qa</span></code></p>
<p>Performs <a class="reference external" href="https://flake8.pycqa.org/en/latest/"><code class="docutils literal notranslate"><span class="pre">flake8</span></code></a> code style checking,
and <a class="reference external" href="https://github.com/PyCQA/flake8-bugbear"><code class="docutils literal notranslate"><span class="pre">flake8-bugbear</span></code></a> design checking.</p>
<p>In addition, some tests to help ensure that <code class="docutils literal notranslate"><span class="pre">aiosmtpd</span></code> is <em>releasable</em> to PyPI are also run.</p>
</li>
</ul>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">docs</span></code></p>
<p>Builds <strong>HTML documentation</strong> and <strong>manpage</strong> using Sphinx.
A <a class="reference external" href="https://docs.pytest.org/en/stable/doctest.html">pytest doctest</a> will run prior to actual building of the documentation.</p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">static</span></code></p>
<p>Performs a <strong>static type checking</strong> using <code class="docutils literal notranslate"><span class="pre">pytype</span></code>.</p>
<p><strong>Note 1:</strong> Please ensure that <a class="reference external" href="https://github.com/google/pytype/blob/2021.02.09/CONTRIBUTING.md#pytype-dependencies">all pytype dependencies</a> have been installed before
executing this testenv.</p>
<p><strong>Note 2:</strong> This testenv will be _SKIPPED_ on Windows,
because <code class="docutils literal notranslate"><span class="pre">pytype</span></code> currently cannot run on Windows.</p>
<p><strong>Note 3:</strong> This testenv does NOT work on <strong>Cygwin</strong>.</p>
</li>
</ul>
</section>
<section id="environment-variables">
<h3>Environment Variables<a class="headerlink" href="#environment-variables" title="Link to this heading"></a></h3>
<section id="asyncio-catchup-delay">
<h4><code class="docutils literal notranslate"><span class="pre">ASYNCIO_CATCHUP_DELAY</span></code><a class="headerlink" href="#asyncio-catchup-delay" title="Link to this heading"></a></h4>
<blockquote>
<div><p>Due to how asyncio event loop works, some actions do not instantly get
responded to. This is especially so on slower / overworked systems.
In consideration of such situations, some test cases invoke a slight
delay to let the event loop catch up.</p>
<p>Defaults to <cite>0.1</cite> and can be set to any float value you want.</p>
</div></blockquote>
</section>
</section>
<section id="different-python-versions">
<h3>Different Python Versions<a class="headerlink" href="#different-python-versions" title="Link to this heading"></a></h3>
<p>The tox configuration files have been created to cater for more than one
Python versions <cite>safely</cite>: If an interpreter is not found for a certain
Python version, tox will skip that whole testenv.</p>
<p>However, with a little bit of effort, you can have multiple Python interpreter
versions on your system by using <code class="docutils literal notranslate"><span class="pre">pyenv</span></code>. General steps:</p>
<ol class="arabic">
<li><p>Install <code class="docutils literal notranslate"><span class="pre">pyenv</span></code> from <a class="reference external" href="https://github.com/pyenv/pyenv#installation">https://github.com/pyenv/pyenv#installation</a></p></li>
<li><p>Install <code class="docutils literal notranslate"><span class="pre">tox-pyenv</span></code> from <a class="reference external" href="https://pypi.org/project/tox-pyenv/">https://pypi.org/project/tox-pyenv/</a></p></li>
<li><p>Using <code class="docutils literal notranslate"><span class="pre">pyenv</span></code>, install the Python versions you want to test on</p></li>
<li><p>Create a <code class="docutils literal notranslate"><span class="pre">.python-version</span></code> file in the root of the repo, listing the
Python interpreter versions you want to make available to tox (see pyenv’s
documentation about this file)</p>
<p><strong>Tip:</strong> The 1st line of <code class="docutils literal notranslate"><span class="pre">.python-version</span></code> indicates your <em>preferred</em> Python version
which will be used to run tox.</p>
</li>
<li><p>Invoke tox with the option <code class="docutils literal notranslate"><span class="pre">--tox-pyenv-no-fallback</span></code> (see tox-pyenv’s
documentation about this option)</p></li>
</ol>
</section>
<section id="housekeep-py">
<h3><code class="docutils literal notranslate"><span class="pre">housekeep.py</span></code><a class="headerlink" href="#housekeep-py" title="Link to this heading"></a></h3>
<p>If you ever need to ‘reset’ your repo, you can use the <code class="docutils literal notranslate"><span class="pre">housekeep.py</span></code> utility
like so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ python housekeep.py superclean
</pre></div>
</div>
<p>It is <em>strongly</em> recommended to NOT do superclean too often, though.
Every time you invoke <code class="docutils literal notranslate"><span class="pre">superclean</span></code>,
tox will have to recreate all its testenvs,
and this will make testing <em>much</em> longer to finish.</p>
<p><code class="docutils literal notranslate"><span class="pre">superclean</span></code> is typically only needed when you switch branches,
or if you want to really ensure that artifacts from previous testing sessions
won’t interfere with your next testing sessions.</p>
<p>For example, you want to force Sphinx to rebuild all documentation.
Or, you’re sharing a repo between environments (say, PSCore and Cygwin)
and the cached Python bytecode messes up execution
(e.g., sharing the exact same directory between Windows PowerShell and Cygwin
will cause problems as Python becomes confused about the locations of the source code).</p>
</section>
</section>
<section id="signing-keys">
<h2>Signing Keys<a class="headerlink" href="#signing-keys" title="Link to this heading"></a></h2>
<p>Starting version 1.3.1,
files provided through <a class="reference external" href="https://pypi.org/project/aiosmtpd/">PyPI</a> or <a class="reference external" href="https://github.com/aio-libs/aiosmtpd/releases">GitHub Releases</a>
will be signed using one of the following GPG Keys:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>GPG Key ID</p></th>
<th class="head"><p>Owner</p></th>
<th class="head"><p>Email</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">5D60</span> <span class="pre">CE28</span> <span class="pre">9CD7</span> <span class="pre">C258</span></code></p></td>
<td><p>Pandu E POLUAN</p></td>
<td><p>pepoluan at gmail period com</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">5555</span> <span class="pre">A6A6</span> <span class="pre">7AE1</span> <span class="pre">DC91</span></code></p></td>
<td><p>Pandu E POLUAN</p></td>
<td><p>pepoluan at gmail period com</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">E309</span> <span class="pre">FD82</span> <span class="pre">73BD</span> <span class="pre">8465</span></code></p></td>
<td><p>Wayne Werner</p></td>
<td><p>waynejwerner at gmail period com</p></td>
</tr>
</tbody>
</table>
</section>
<section id="license">
<h2>License<a class="headerlink" href="#license" title="Link to this heading"></a></h2>
<p><code class="docutils literal notranslate"><span class="pre">aiosmtpd</span></code> is released under the Apache License version 2.0.</p>
</section>
<section id="contents">
<h2>Contents<a class="headerlink" href="#contents" title="Link to this heading"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a><ul>
<li class="toctree-l2"><a class="reference internal" href="intro.html#relevant-rfcs">Relevant RFCs</a></li>
<li class="toctree-l2"><a class="reference internal" href="intro.html#other-references">Other references</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="concepts.html">Concepts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="concepts.html#sessions-and-envelopes">Sessions and envelopes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="cli.html">Command line usage</a><ul>
<li class="toctree-l2"><a class="reference internal" href="cli.html#options">Options</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="controller.html">Programmatic usage</a><ul>
<li class="toctree-l2"><a class="reference internal" href="controller.html#using-the-controller">Using the controller</a></li>
<li class="toctree-l2"><a class="reference internal" href="controller.html#enabling-smtputf8">Enabling SMTPUTF8</a></li>
<li class="toctree-l2"><a class="reference internal" href="controller.html#module-aiosmtpd.controller">Controller API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="smtp.html">The SMTP Module</a><ul>
<li class="toctree-l2"><a class="reference internal" href="smtp.html#subclassing">Subclassing</a></li>
<li class="toctree-l2"><a class="reference internal" href="smtp.html#server-hooks">Server hooks</a></li>
<li class="toctree-l2"><a class="reference internal" href="smtp.html#module-aiosmtpd.smtp">aiosmtpd.smtp</a></li>
<li class="toctree-l2"><a class="reference internal" href="smtp.html#enabling-starttls">Enabling STARTTLS</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="lmtp.html">The LMTP class</a></li>
<li class="toctree-l1"><a class="reference internal" href="handlers.html">Handlers</a><ul>
<li class="toctree-l2"><a class="reference internal" href="handlers.html#from_cli"><code class="docutils literal notranslate"><span class="pre">from_cli()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="handlers.html#handler-hooks">Handler Hooks</a></li>
<li class="toctree-l2"><a class="reference internal" href="handlers.html#built-in-handlers">Built-in handlers</a></li>
<li class="toctree-l2"><a class="reference internal" href="handlers.html#the-mailbox-handler">The Mailbox Handler</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="auth.html">Authentication System</a><ul>
<li class="toctree-l2"><a class="reference internal" href="auth.html#activating-authentication">Activating Authentication</a></li>
<li class="toctree-l2"><a class="reference internal" href="auth.html#auth-api">AUTH API</a></li>
<li class="toctree-l2"><a class="reference internal" href="auth.html#security-considerations">Security Considerations</a></li>
<li class="toctree-l2"><a class="reference internal" href="auth.html#example">Example</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="proxyprotocol.html">PROXY Protocol Support</a><ul>
<li class="toctree-l2"><a class="reference internal" href="proxyprotocol.html#activating">Activating</a></li>
<li class="toctree-l2"><a class="reference internal" href="proxyprotocol.html#handle-proxy-hook"><code class="docutils literal notranslate"><span class="pre">handle_PROXY</span></code> Hook</a></li>
<li class="toctree-l2"><a class="reference internal" href="proxyprotocol.html#parsing-the-header">Parsing the Header</a></li>
<li class="toctree-l2"><a class="reference internal" href="proxyprotocol.html#enums">Enums</a></li>
<li class="toctree-l2"><a class="reference internal" href="proxyprotocol.html#proxydata-api"><code class="docutils literal notranslate"><span class="pre">ProxyData</span></code> API</a></li>
<li class="toctree-l2"><a class="reference internal" href="proxyprotocol.html#proxytlv-api"><code class="docutils literal notranslate"><span class="pre">ProxyTLV</span></code> API</a></li>
<li class="toctree-l2"><a class="reference internal" href="proxyprotocol.html#note-on-crc32c-calculation">Note on CRC32C Calculation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="migrating.html">Migrating from smtpd to aiosmtpd</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a><ul>
<li class="toctree-l2"><a class="reference internal" href="testing.html#test-framework-pytest">Test Framework: <code class="docutils literal notranslate"><span class="pre">pytest</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="manpage.html">aiosmtpd</a><ul>
<li class="toctree-l2"><a class="reference internal" href="manpage.html#synopsis">SYNOPSIS</a></li>
<li class="toctree-l2"><a class="reference internal" href="manpage.html#environment">ENVIRONMENT</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="NEWS.html">NEWS for aiosmtpd</a><ul>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#aiosmtpd-next">1.5.0 (aiosmtpd-next)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#post2-2023-01-19">1.4.4.post2 (2023-01-19)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id2">1.4.4 (2023-01-17)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id4">1.4.3 (2022-12-21)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id6">1.4.2 (2021-03-08)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id8">1.4.1 (2021-03-04)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id10">1.4.0 (2021-02-26)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id13">1.3.2 (2021-02-20)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id16">1.3.1 (2021-02-18)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id18">1.3.0 (2021-02-09)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id21">1.2.4 (2021-01-24)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id24">1.2.3 (2021-01-14)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id27">1.2.2 (2020-11-08)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id30">1.2 (2018-09-01)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id31">1.1 (2017-07-06)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#id32">1.0 (2017-05-15)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#rc1-2017-05-12">1.0rc1 (2017-05-12)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#b1-2017-05-07">1.0b1 (2017-05-07)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#a5-2017-04-06">1.0a5 (2017-04-06)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#a4-2016-11-29">1.0a4 (2016-11-29)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#a3-2016-11-24">1.0a3 (2016-11-24)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#a2-2016-11-22">1.0a2 (2016-11-22)</a></li>
<li class="toctree-l2"><a class="reference internal" href="NEWS.html#a1-2015-10-19">1.0a1 (2015-10-19)</a></li>
</ul>
</li>
</ul>
</div>
</section>
<section id="indices-and-tables">
<h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
</ul>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="intro.html" class="btn btn-neutral float-right" title="Introduction" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2015-2024, The aiosmtpd Developers.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>