mirror of
https://github.com/certbot/certbot.git
synced 2026-08-04 12:21:51 +02:00
More informative message for RDNS fail.
This commit is contained in:
+8
-3
@@ -135,8 +135,13 @@ def supports_starttls(mx_host):
|
|||||||
except socket.error as e:
|
except socket.error as e:
|
||||||
print "Connection to %s failed: %s" % (mx_host, e.strerror)
|
print "Connection to %s failed: %s" % (mx_host, e.strerror)
|
||||||
return False
|
return False
|
||||||
except smtplib.SMTPException:
|
except smtplib.SMTPException, e:
|
||||||
print "No STARTTLS support on %s" % mx_host
|
# In order to talk to some hosts, you need to run this from a host that has a
|
||||||
|
# reverse DNS entry. AWS instances all have reverse DNS, as an example.
|
||||||
|
if e[0] == 554:
|
||||||
|
print e[1]
|
||||||
|
else:
|
||||||
|
print "No STARTTLS support on %s" % mx_host, e[0]
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def min_tls_version(mail_domain):
|
def min_tls_version(mail_domain):
|
||||||
@@ -172,8 +177,8 @@ if __name__ == '__main__':
|
|||||||
for domain in open(input).readlines():
|
for domain in open(input).readlines():
|
||||||
domain = domain.strip()
|
domain = domain.strip()
|
||||||
suffix = check_certs(domain)
|
suffix = check_certs(domain)
|
||||||
min_version = min_tls_version(domain)
|
|
||||||
if suffix != "":
|
if suffix != "":
|
||||||
|
min_version = min_tls_version(domain)
|
||||||
suffix_match = "." + suffix
|
suffix_match = "." + suffix
|
||||||
config["acceptable-mxs"][domain] = {
|
config["acceptable-mxs"][domain] = {
|
||||||
"accept-mx-domains": [suffix_match]
|
"accept-mx-domains": [suffix_match]
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
dnspython
|
||||||
|
publicsuffix
|
||||||
|
m2crypto
|
||||||
Reference in New Issue
Block a user