From 97cc01c25359fd5465b7acf2fb4ad5f7e4c19309 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 13 Jan 2015 15:41:38 +0000 Subject: Stub MX-test. This will perform a DNS-lookup AND SMTP-test for the given domain. --- lib/custodian/protocoltest/mx.rb | 67 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 lib/custodian/protocoltest/mx.rb (limited to 'lib/custodian/protocoltest/mx.rb') diff --git a/lib/custodian/protocoltest/mx.rb b/lib/custodian/protocoltest/mx.rb new file mode 100644 index 0000000..70fe465 --- /dev/null +++ b/lib/custodian/protocoltest/mx.rb @@ -0,0 +1,67 @@ +require 'custodian/protocoltest/tcp' + +# +# The MX (DNS + smtp) test. +# +# This object is instantiated if the parser sees a line such as: +# +### +### bytemark.co.uk must run mx otherwise 'mail fail'. +### +# +# +module Custodian + + module ProtocolTest + + class MXTest < TestFactory + + + # + # Constructor + # + def initialize( line ) + @line = line + end + + + # + # Allow this test to be serialized. + # + def to_s + @line + end + + + # + # Run the test. + # + def run_test + + # reset the error, in case we were previously executed. + @error = nil + + return true; + end + + + + + # + # If the test fails then report the error. + # + def error + @error + end + + + + + register_test_type "mx" + + + + + end + end +end -- cgit v1.2.1