Skip to main content

Daemon which provides TLS client policy for Postfix via socketmap, according to domain MTA-STS policy

Project description

Daemon which provides TLS client policy for Postfix via socketmap, according to domain MTA-STS policy. Current support of RFC8461 is limited - daemon lacks some minor features:

  • Proactive policy fetch

  • Fetch error reporting

  • Fetch ratelimit

## Dependencies

  • Python 3.5.3+

  • aiodns

  • aiohttp

  • pynetstring

  • PyYAML

  • (optional) uvloop

  • pycares>=2.3.0

## Installation

### Method 1. System-wide install

Run in project directory:

`bash python3 -m pip install . `

Package scripts shall be available in standard executable locations upon completion.

### Method 2. Running from project directory

Installing dependencies:

`bash python3 -m pip install -r requirements.txt `

Now script can be run right from source directory.

#### pip user install

Both previous methods can be run with –user option of pip installer. In this case superuser privileges are not required and package shall be installed to user home directory. So, for first method script executabled will appear in ~/.local/bin.

### Method 3. Install into virtualenv

See “Building virtualenv”

## Building virtualenv

Run make in project directory in order to build virtualenv. As result of it, new directory venv shall appear. venv contains interpreter and all required dependencies, i.e. encloses package with depencencies in separate environment. It is possible to specify alternative path where virtualenv directory shall be placed. Specify VENV variable for make command. Example:

`bash make VENV=~/postfix-mta-sts-resolver `

Such virtual environment can be moved to another machine of similar type (as far python interpreter is compatible with new environment). If virtualenv is placed into same location on new machine, application can be runned this way:

`bash venv/bin/mta-sts-daemon `

Otherwise, some hacks required. First option - explicitly call virtualenv interpreter:

`bash venv/bin/python venv/bin/mta-sts-daemon `

Second option - specify new path in shebang of scripts installed in virtualenv. It is recommended to build virtualenv at same location which app shall occupy on target system.

## Configuration

See example config in source code directory. Default config location is: /etc/postfix/mta-sts-daemon.yml

## Postfix configuration

Add line like

` smtp_tls_policy_maps = socketmap:inet:127.0.0.1:8461:postfix `

into your main.cf config.

## Credits

Inspired by [this forum thread](http://postfix.1071664.n5.nabble.com/MTA-STS-when-td95086.html).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

postfix_mta_sts_resolver-0.1.5.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

postfix_mta_sts_resolver-0.1.5-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file postfix_mta_sts_resolver-0.1.5.tar.gz.

File metadata

  • Download URL: postfix_mta_sts_resolver-0.1.5.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.12.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.3

File hashes

Hashes for postfix_mta_sts_resolver-0.1.5.tar.gz
Algorithm Hash digest
SHA256 2bcc9587a1915709495ae4619d2da87db7d0bb62068215f7ea2e03537da0ffb3
MD5 53cb2c79433c473dd072b0103400f8bb
BLAKE2b-256 7a177e9ea809dca5353547c4a220cc38af92b5664e278be03ae50cfc1b355b9e

See more details on using hashes here.

File details

Details for the file postfix_mta_sts_resolver-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: postfix_mta_sts_resolver-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.12.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.3

File hashes

Hashes for postfix_mta_sts_resolver-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e9ef57dc52206b8a5234df827f7cc4330a233b64279c40ea4b6853ebe1f06fec
MD5 89de2b6bb47cc1834d961a2f3e8668dd
BLAKE2b-256 46edf1e310e0d870a6e9c529cca562d77519438ee33a829e14886571dee95b02

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page