FeeiCN/GSIL

扫描成功 不能发邮件...

Closed this issue · 5 comments

2018-01-17 16:33:07,611 [GSIL] [INFO] Process count: 3
Traceback (most recent call last):
File "/root/gsil/gsil/init.py", line 37, in search
return Engine(token=token).search(rule)
File "/root/gsil/gsil/engine.py", line 210, in search
Process(self.result, self.rule_object).process()
File "/root/gsil/gsil/process.py", line 36, in process
ret_mail = self._send_mail(maybe_mistake)
File "/root/gsil/gsil/process.py", line 68, in _send_mail
return Notification(subject, to).notification(html)
File "/root/gsil/gsil/notification.py", line 59, in notification
s.starttls()
File "/usr/local/lib/python3.6/smtplib.py", line 771, in starttls
server_hostname=self._host)
File "/usr/local/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/local/lib/python3.6/ssl.py", line 814, in init
self.do_handshake()
File "/usr/local/lib/python3.6/ssl.py", line 1068, in do_handshake
self._sslobj.do_handshake()
File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:777)

请问如何解决,环境是centos7 python3.6

看情况应该是启用TLS加密邮件失败,是不是你们邮箱不支持TLS或者你邮件端口配置错了。

更改正确设置以后出现了以下错误代码,用的是腾讯企业邮箱 支持tls:
发送邮件服务器:hwsmtp.exmail.qq.com ,使用SSL,端口号465

2018-01-17 17:09:52,491 [GSIL] [INFO] Process count: 3
^CProcess ForkPoolWorker-1:
Traceback (most recent call last):
File "gsil.py", line 28, in
sys.exit(gsil())
File "/root/gsil/gsil/init.py", line 100, in gsil
start(sys.argv[1])
File "/root/gsil/gsil/init.py", line 75, in start
pool.join()
File "/usr/local/lib/python3.6/multiprocessing/pool.py", line 546, in join
self._worker_handler.join()
File "/usr/local/lib/python3.6/threading.py", line 1056, in join
self._wait_for_tstate_lock()
File "/usr/local/lib/python3.6/threading.py", line 1072, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt

腾讯的邮箱如果还有问题直接使用25端口就可以了。
这个报错是你Ctrl-C导致的,可以无视。

一开始用的就是25 不行啊.....不ctrl-c等了十分钟还是停在
2018-01-17 17:09:52,491 [GSIL] [INFO] Process count: 3

....找到原因了 有些iptables设置阻止了邮件发出....