Coder Social home page Coder Social logo

bobberty / mtasts-exim-perl Goto Github PK

View Code? Open in Web Editor NEW
16.0 6.0 1.0 83 KB

Perl script designed to be used by Exim MTA for MTA-STS compliance.

License: MIT License

Perl 100.00%
exim mta-sts rfc-8461 perl tlsrpt mta email server rfc-8460 strict-transport-security

mtasts-exim-perl's People

Contributors

bobberty avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zmdprogrom

mtasts-exim-perl's Issues

MTA-STS fails with policy invalid on invalid PKIX for mta-sts.example.com, but should act as if policy is none

Describe the bug
Failing PKIX validation for https://mta-sts.example.com/, the library considers the destination to have completely failed policy validation.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://email-security-scans.org
  2. Click on 'start test'
  3. Wait for email receipt
  4. Reply all to the received email
  5. Notice that 'challenge_uniq' cannot be delivered. This challenge uses an invalid TLS certificate (no PKIX path; for unrelated reasons and to be fixed in the future)

Expected behavior
A clear and concise description of what you expected to happen.
According to RFC8461:

   If a valid TXT record is found but no policy can be fetched via HTTPS
   (for any reason), and there is no valid (non-expired) previously
   cached policy, senders MUST continue with delivery as though the
   domain has not implemented MTA-STS.

Suggested Fix

diff --git a/mta-lmdb.pl b/mta-lmdb.pl
index 99b451c..7530d71 100644
--- a/mta-lmdb.pl
+++ b/mta-lmdb.pl
@@ -120,7 +120,7 @@ sub getmta
                        eval { $policy = $domain->policy; } or do {
                                $txn->commit;
 # Found a good MTA-STS DNS entry and no policy is available from the cache or http
-                               return ('fail');
+                               return ('none');
                        };
 # Check for badly formatted Policy
                        eval {

Additional context
This bug and fix has been identified by a colleague using the test system; Leaving it open whether the colleague wants to chime in, but i guess the bug should be reported/fixed. ;-)

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.