Giter VIP home page Giter VIP logo

mta-sts.shawky.com.au's Introduction


📩 A Template to host an MTA-STS Policy file on GitHub

Use this template to host your MTA Strict Transport Security (MTA-STS) [RFC 8461] policy file on GitHub Pages.

How To UseLicenseAuthor (https://github.com/jpawlowski)

MTA-STS is a security standard to secure e-mail delivery. E-mail servers that send inbound e-mail to your domain will be able to detect that your e-mail server supports SMTP-over-TLS via STARTTLS (also known as Opportunistic TLS) before opening the actual connection.

In case the sending e-mail server is not able to initiate a secure connection, it will end the connection to enforce transport layer encryption. This mitigates Man-in-the-middle DNS and SMTP downgrade attacks that would allow an attacker to read or manipulate e-mail in transit.

How To Use

  1. Make sure you are signed in to GitHub. Then click on Use this template to create a copy to your own GitHub profile (see GitHub Docs). Don't clone the repository. You may name your repository whatever you like. For simplicity, you can name it mta-sts.<your_domain.tld>.

  2. Change the file .well-known/mta-sts.txt according to your needs.

  3. Create a CNAME record for mta-sts.<your_domain.tld> in your domain's DNS that points to <user>.github.io or <organization>.github.io and enable GitHub Pages.

  4. Open a browser to https://mta-sts.<your_domain.tld> and make sure it does not show any certificate warnings.

  5. Create a TXT record for _mta-sts.<your_domain.tld> in your domain's DNS to enable the MTA-STS policy for your domain. You may copy & paste this to your DNS provider:

    #HOST       #TTL    #TYPE    #VALUE
    _mta-sts    3600    TXT      "v=STSv1; id=20220317000000Z"
    

    Note that you will need to change the id= here whenever you make changes to your mta-sts.txt policy file.

  6. Validate your setup, for example by using the MTA-STS validator created by @aykevl.

Optional (but highly recommended):

  1. Create another TXT record for _smtp._tls.<your_domain.tld> in your domain's DNS to enable reporting (see RFC 8460). You may copy & paste this to your DNS provider:

    #HOST         #TTL    #TYPE    #VALUE
    _smtp._tls    3600    TXT      "v=TLSRPTv1; rua=mailto:tls-rua@mailcheck.<your_domain.tld>"
    

    Note that the e-mail recipient mailbox shall be on a different domain without MTA-STS being configured. It is also quite painful to manually deal with the reports other e-mail providers will send to you. For that particular reason, you may want to consider sending these e-mails to a 3rd-party tool like Report URI, URIports, or from other commercial providers.

    You probably want this to be the same tool you might use for DMARC reports, like DMARC Analyzer or Dmarcian.

Expanding Step 3.

  1. Follow steps 1. to 3 above. My project naming convention was subtly different being mta-sts.<your_fully_qualified_domain_name>. Before proceeding to step 4 above, it is important to get the Custom domain configured:

  2. From https://github.com/<user>/mta-sts.<your_fully_qualified_domain_name> project navigate to Settings then Pages. Under Custom domain enter mta-sts.<your_fully_qualified_domain_name> as the custom domain name then press Save. Wait until the DNS check is successful. Investigate issues with your DNS service otherwise.

  3. Once the DNS test is successful Github will generate an SSL certificate for this URL. Once that is complete you may check the "Enforce HTTPS" box. Refresh the page and note that GitHub Pages now references the correct URL using HTTPS. Select "Visit site". This should show the mta-sts.txt file. Proceed to step 4 above once this is successful.

  4. Within your project edit the file .well-known/mta-sts.txt, remove all comments etc. Initially set the mode to testing. Do not reduce max_age below 1 week. This is the recommended minimum time, once stable you could be pro active and increase this time. Switch mode to enforce once you are confident MTA-STS is working.

  5. I use Mailahrdener for my free email system monitoring service: (https://www.mailhardener.com/kb/mta-sts) My only issues with email result from HotMail (Microsoft Outlooks) reputation algorithms where I get hit from being within a larger pool of IP addresses or low volume mail.

License

MIT License

Author

julian.pawlowski.me  ·  GitHub @jpawlowski  ·  Twitter @Loredo

mta-sts.shawky.com.au's People

Contributors

cshawky avatar

Watchers

 avatar

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.