Giter Club home page Giter Club logo

mta-sts's Introduction

Online MTA-STS testing tool

This tool verifies whether a give host correctly implements the new in-development MTA-STS standard for downgrade-resistant secure email. It is very new and not very well tested so don't rely on it's result too much.

Online version: https://aykevl.nl/apps/mta-sts/

License: BSD 2-clause license (see LICENSE.txt).

Installing on Debian

This guide has been written for Debian buster. It will work on stretch with minimal modifications (replace python3-flask-limiter with the pip3 package Flask-Limiter).

  1. Install dependencies:

    $ apt-get install uwsgi uwsgi-plugin-python3 python3-flask python3-flask-limiter python3-dnspython
    
  2. Create a configuration file for uWSGI (howto) at /etc/uwsgi/emperor.ini:

    [uwsgi]
    emperor = /etc/uwsgi/vassals
    uid = www-data
    gid = www-data
    limit-as = 1024
    logto = /tmp/uwsgi.log
  3. Create a configuration for this app at /etc/uwsgi/vassals/mta-sts.ini (create /etc/uwsgi/vassals first):

    [uwsgi]
    socket             = /tmp/mta-sts.sock
    manage-script-name = true
    mount              = /=check:app
    plugins            = python3
    chmod-socket       = 666
    pythonpath         = /some/path/mta-sts
  4. Enable and start uWSGI (check /tmp/uwsgi.log for errors):

    $ sytemctl enable emperor.uwsgi.service
    $ sytemctl start emperor.uwsgi.service
    
  5. Make sure a webserver redirects requests to /tmp/mta-sts.sock. For example, with nginx:

    location = /apps/mta-sts/api {
        include uwsgi_params;
        uwsgi_pass unix:/tmp/mta-sts.sock;
    }
  6. Test the app with a browser.

mta-sts's People

Contributors

aykevl avatar c960657 avatar wiktor-k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mta-sts's Issues

Server experiencing DNS problems

The service seems to be struggling to resolve DNS entries that are, in fact, publicly resolvable. Try running the "gmail.com" domain and you'll see the errors.
Screen Shot 2022-03-30 at 9 14 14 AM

does MTA-SMS validator present cached results

Hi

MTA-SMS validator is a great service.

I have just implementated an improvement in the configuration of a server, but MTA-SMS validator still suggests the same improvement.

The reason may be that MTA-SMS validator still presents the result from before I made the improvement. That would be perfectly ok if

  • the test result gave an indication on when it was established
  • the test result gave an indication on how to get an updated result (e.g. wait for an hour or a day, or hit this and that button)

MTA-STS Check reports an error if there are too many MX records

Hi,

Our MTA-STS is working fine, but we get an error on the MTA-STS check which looks like it's due to the tool giving an error after checking the certificates of the first 6 MX records. As Gmail use 7 records currently it might be worth considering upping the number of certificate checks to ensure that the check completes successfully. :)

image

Seconds in error message calculated incorrectly

posteo.de uses a small max_age value of five minutes.

max_age: 300

The service reports the warning below.

Error: Very short max_age field specified. It is less than a day with 0.003472222222222222 seconds. The suggested amount is at least in the order of weeks (this validator uses 28 days).

As the unit for max_age is integer seconds, shouldn’t it say 300 seconds in the message?

Upgrade to Python3.7 ?

Hey

Can you upgrade python to 3.7 or make it continue checking MTA-STS files if https cert checking fails?

Currently I hit this bug when trying to verify my domain: https://bugs.python.org/issue28414

import http, ssl

host = "xn--sb-lka.org"
context = context = ssl.create_default_context()
conn = http.client.HTTPSConnection(host, timeout=10, context=context)

conn.request('GET', f'https://{host}/')
# CertificateError: hostname 'søb.org' doesn't match 'xn--sb-lka.org'

"v=STSv1 ; id=1234;" is valid as per RFC.

The RFC 8461 defines:

   sts-text-record = sts-version 1*(sts-field-delim sts-field)
                     [sts-field-delim]

   sts-field-delim = *WSP ";" *WSP

   sts-version     = %s"v=STSv1"

So based on that the "v=STSv1 ;" should be considered valid. The RFC only states that:

If multiple TXT records for "_mta-sts" are returned by the resolver,
records that do not beginwith "v=STSv1;" are discarded.

Examples (inside array, number of TXT records):
["v=STSv1; id=1234"] -> valid
["v=STSv1 ; id=1234"] -> valid
["v", "v=STSv1; id=1234"] -> valid (second)
["v", "v=STSv1 ; id=1234"] -> invalid (all)

TLSRPT always fail

I tested my domain on your online testing site and I always got TLSRPT failed.
Error: Cannot resolve DNS: domain _smtp-tlsrpt.mxdove.com does not exist.

Is there problem with my DNS setting?
My test shows:
# dig _smtp-tlsrpt.mxdove.com TXT +short
"v=TLSRPTv1\; rua=mailto:[email protected]."

Thanks for help.

Wildcard TLS certificates not recognized.

My mail server (mail.koehn.com, used by domain koe.hn) uses a wildcard TLS certificate (*.koehn.com). Your otherwise fantastic tool doesn't recognize that this certificate is valid for this server.

Thanks for the handy tool!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.