首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Buildbot (来自buildbot.net):不作为状态目标的iCloud电子邮件

Buildbot (来自buildbot.net):不作为状态目标的iCloud电子邮件
EN

Stack Overflow用户
提问于 2014-06-09 08:05:45
回答 2查看 243关注 0票数 1

我正在设置buildbot以使用iCloud电子邮件地址作为状态目标:

代码语言:javascript
复制
m = mail.MailNotifier(fromaddr="some_icloud_user@me.com",
                  sendToInterestedUsers=False,
                  extraRecipients=["some_other_icloud_users@me.com"],
                  useTls=True, relayhost="smtp.mail.me.com", smtpPort=587,
                  smtpUser="some_icloud_user@me.com", smtpPassword="some_icloud_password")

( iCloud电子邮件设置说明为这里)。

似乎TLS/SSL握手(来自master/twistd.log)有问题:

代码语言:javascript
复制
2014-06-09 00:43:34-0700 [ESMTPSender,client] SMTP Client retrying server. Retry: 1
2014-06-09 00:43:34-0700 [ESMTPSender,client] Unhandled Error
    Traceback (most recent call last):
      File "/Users/ionut/work/buildbot/sandbox/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-macosx-10.9-intel.egg/twisted/internet/tcp.py", line 214, in doRead
        return self._dataReceived(data)
      File "/Users/ionut/work/buildbot/sandbox/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-macosx-10.9-intel.egg/twisted/internet/tcp.py", line 220, in _dataReceived
        rval = self.protocol.dataReceived(data)
      File "/Users/ionut/work/buildbot/sandbox/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-macosx-10.9-intel.egg/twisted/protocols/basic.py", line 571, in dataReceived
        why = self.lineReceived(line)
      File "/Users/ionut/work/buildbot/sandbox/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-macosx-10.9-intel.egg/twisted/mail/smtp.py", line 1063, in lineReceived
        why = self._okresponse(self.code,'\n'.join(self.resp))
    --- <exception caught here> ---
      File "/Users/ionut/work/buildbot/sandbox/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-macosx-10.9-intel.egg/twisted/mail/smtp.py", line 1411, in esmtpState_starttls
        self.transport.startTLS(self.context)
    exceptions.AttributeError: 'Client' object has no attribute 'startTLS'
2014-06-09 00:43:34-0700 [ESMTPSender,client] Unhandled error in Deferred:
2014-06-09 00:43:34-0700 [ESMTPSender,client] Unhandled Error
    Traceback (most recent call last):
    Failure: twisted.mail.smtp.TLSError: 451 Could not complete the SSL/TLS handshake
    <<< 250-NO-SOLICITING
    <<< 250 SIZE 28311552
    >>> STARTTLS
    <<< 220 2.5.0 Go ahead with TLS negotiation.

注意:我无法通过"mail“或"sendmail”从命令行发送电子邮件,因为我注意到buildbot有自己的电子邮件客户端Python代码。

请帮忙-谢谢!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-06-14 08:09:11

解决了这个问题:由于buildbot使用了virtualenv,所以我需要通过easy_install安装easy_install--在包含本地python的目录(即“沙盒”)中运行"easy_install pyopenssl“,并且SSL握手正确进行,因此buildbot现在可以发送电子邮件了。最初,我通过从中链接到SSL目录来“安装”pyOpenSSL。看起来buildbot安装脚本没有安装pyOpenSSL,很奇怪。谢谢!

票数 0
EN

Stack Overflow用户

发布于 2014-06-09 19:52:07

随着现在所有的反垃圾邮件措施到位,直接向收件人的邮件服务器发送邮件的策略不太可能奏效。您最好使用组织的SMTP服务器。

撇开这点不说,我怀疑这里的问题是你没有安装墓穴,或者使用的是不支持TLS的扭曲反应堆。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24116105

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档