From 13d325e25902bd29a163c9bcafb5bdc250943c70 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 22 Dec 2015 17:18:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=95=E6=8D=89smtp=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/install.py | 4 ++-- jumpserver.conf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install/install.py b/install/install.py index 9d2c13ed7..4d70f7e78 100755 --- a/install/install.py +++ b/install/install.py @@ -6,7 +6,7 @@ import time import os import sys import MySQLdb -from smtplib import SMTP, SMTPAuthenticationError, SMTPConnectError +from smtplib import SMTP, SMTPAuthenticationError, SMTPConnectError, SMTPSenderRefused import ConfigParser import socket import fcntl @@ -127,7 +127,7 @@ class PreSetup(object): smtp.quit() return True - except (SMTPAuthenticationError, socket.timeout, socket.gaierror), e: + except (SMTPAuthenticationError, socket.timeout, socket.gaierror, SMTPSenderRefused, SMTPConnectError), e: color_print(e, 'red') return False diff --git a/jumpserver.conf b/jumpserver.conf index 4173bdc36..f184a246f 100644 --- a/jumpserver.conf +++ b/jumpserver.conf @@ -19,5 +19,5 @@ email_host = smtp.qq.com email_port = 25 email_host_user = xxxxxxxx@qq.com email_host_password = xxxxxx -email_use_tls = True +email_use_tls = False