Metadata-Version: 2.5
Name: fastsmtp
Version: 0.6.0
Summary: TLS-capable async SMTP server that receives emails, validates DKIM/SPF, and forwards contents to configurable webhooks
Project-URL: Homepage, https://jsenecal.github.io/fastsmtp/
Project-URL: Documentation, https://jsenecal.github.io/fastsmtp/
Project-URL: Source, https://github.com/jsenecal/fastsmtp
Project-URL: Issues, https://github.com/jsenecal/fastsmtp/issues
Project-URL: Changelog, https://github.com/jsenecal/fastsmtp/releases
Author: Jonathan Senecal
License-Expression: AGPL-3.0-or-later
License-File: LICENSE
Keywords: dkim,email,mail,n8n,smtp,spf,webhook
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Communications :: Email :: Mail Transport Agents
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Requires-Python: >=3.12
Requires-Dist: aiobotocore>=2.9.0
Requires-Dist: aiosmtpd>=1.4
Requires-Dist: alembic>=1.14
Requires-Dist: asyncpg>=0.30
Requires-Dist: cryptography>=46.0.3
Requires-Dist: dkimpy>=1.1
Requires-Dist: dnspython>=2.7
Requires-Dist: fastapi>=0.115
Requires-Dist: google-re2>=1.1
Requires-Dist: httpx>=0.28
Requires-Dist: prometheus-client>=0.21
Requires-Dist: pydantic-settings>=2.6
Requires-Dist: pyspf>=2.0
Requires-Dist: redis>=5.0
Requires-Dist: sqlalchemy[asyncio]>=2.0
Requires-Dist: tenacity>=9.0
Requires-Dist: typer>=0.14
Requires-Dist: uvicorn[standard]>=0.32
Provides-Extra: dev
Requires-Dist: aiosmtplib>=3.0; extra == 'dev'
Requires-Dist: coverage>=7.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Provides-Extra: mariadb
Requires-Dist: aiomysql>=0.2; extra == 'mariadb'
Description-Content-Type: text/markdown

# FastSMTP

A TLS-capable, async SMTP server that receives email, verifies DKIM and SPF, and forwards
the contents to configurable webhooks. Built for Python 3.12+ and for integration with n8n
and other webhook-based workflow platforms.

This is the server package. The remote CLI client is a separate distribution,
[`fastsmtp-cli`](https://pypi.org/project/fastsmtp-cli/), which talks to a running server
over HTTP and does not depend on this one.

## Install

```bash
pip install fastsmtp
```

On Alpine and other musl-based distributions, note that `google-re2` publishes manylinux
wheels but no musllinux wheels, so pip has to build it: install a compiler and the RE2
library first, or use the container image instead.

Container images are published to
[ghcr.io/jsenecal/fastsmtp](https://github.com/jsenecal/fastsmtp/pkgs/container/fastsmtp).

## Run

```bash
export FASTSMTP_DATABASE_URL=postgresql+asyncpg://user:pass@localhost/fastsmtp
export FASTSMTP_ROOT_API_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))")

fastsmtp db upgrade head   # apply migrations first, every time
fastsmtp serve
```

Configuration is read from `FASTSMTP_*` environment variables and from a `.env` file in the
working directory. Migrations are never applied automatically: run `fastsmtp db upgrade head`
before starting a newer version, or the server refuses to start against a database behind it.

## Documentation

Full documentation, including the configuration reference, the HTTP API and the rules
engine, is at <https://jsenecal.github.io/fastsmtp/>.

Source and issue tracker: <https://github.com/jsenecal/fastsmtp>.

## License

AGPL-3.0-or-later - this program is free software: you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option) any later
version. See [LICENSE](LICENSE).
