当前位置: 首页>>代码示例>>Python>>正文


Python Suspect.recipients方法代码示例

本文整理汇总了Python中fuglu.shared.Suspect.recipients方法的典型用法代码示例。如果您正苦于以下问题:Python Suspect.recipients方法的具体用法?Python Suspect.recipients怎么用?Python Suspect.recipients使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fuglu.shared.Suspect的用法示例。


在下文中一共展示了Suspect.recipients方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_suspect

# 需要导入模块: from fuglu.shared import Suspect [as 别名]
# 或者: from fuglu.shared.Suspect import recipients [as 别名]
 def get_suspect(self):
     success=self.sess.getincomingmail()
     if not success:
         self.logger.error('incoming smtp transfer did not finish')
         return None
     
     sess=self.sess
     fromaddr=sess.from_address
     toaddr=sess.to_address
     tempfilename=sess.tempfilename
     
     suspect=Suspect(fromaddr,toaddr,tempfilename)
     suspect.recipients=set(sess.recipients)
     return suspect
开发者ID:gryphius,项目名称:fuglu-travis-test,代码行数:16,代码来源:smtpconnector.py

示例2: get_suspect

# 需要导入模块: from fuglu.shared import Suspect [as 别名]
# 或者: from fuglu.shared.Suspect import recipients [as 别名]
 def get_suspect(self):
     success=self.sess.getincomingmail()
     if not success:
         self.logger.error('incoming smtp transfer did not finish')
         return None
     
     sess=self.sess
     fromaddr="[email protected]"
     toaddr="[email protected]"
     
     tempfilename=sess.tempfilename
     
     suspect=Suspect(fromaddr,toaddr,tempfilename)
     suspect.recipients=[toaddr,]
     return suspect
开发者ID:gryphius,项目名称:fuglu-travis-test,代码行数:17,代码来源:ncblackholeconnector.py

示例3: get_suspect

# 需要导入模块: from fuglu.shared import Suspect [as 别名]
# 或者: from fuglu.shared.Suspect import recipients [as 别名]
 def get_suspect(self):
     succ=self.sess.getincomingmail()
     if not succ:
         self.logger.error('MILTER SESSION NOT COMPLETED')
         return None
     
     sess=self.sess
     fromaddr=sess.from_address
     toaddr=sess.to_address
     tempfilename=sess.tempfilename
     body=open(tempfilename).read()
     #self.logger.info("BODY=%s"%body)
     #self.logger.info("MILTER: from=%s to=%s"%(fromaddr,toaddr))
     suspect=Suspect(fromaddr,toaddr,tempfilename)
     suspect.recipients=set(sess.recipients)
     return suspect
开发者ID:gryphius,项目名称:fuglu-travis-test,代码行数:18,代码来源:milterconnector.py

示例4: get_suspect

# 需要导入模块: from fuglu.shared import Suspect [as 别名]
# 或者: from fuglu.shared.Suspect import recipients [as 别名]
    def get_suspect(self):
        succ = self.sess.getincomingmail()
        if not succ:
            self.logger.error('MILTER SESSION NOT COMPLETED')
            return None

        sess = self.sess
        fromaddr = sess.from_address
        toaddr = sess.to_address
        tempfilename = sess.tempfilename
        suspect = Suspect(fromaddr, toaddr, tempfilename)
        suspect.recipients = set(sess.recipients)

        if sess.helo is not None and sess.addr is not None and sess.rdns is not None:
            suspect.clientinfo = sess.helo, sess.addr, sess.rdns

        return suspect
开发者ID:gryphius,项目名称:fuglu,代码行数:19,代码来源:milterconnector.py

示例5: get_suspect

# 需要导入模块: from fuglu.shared import Suspect [as 别名]
# 或者: from fuglu.shared.Suspect import recipients [as 别名]
    def get_suspect(self):
        success = self.sess.getincomingmail()
        if not success:
            self.logger.error('incoming esmtp transfer did not finish')
            return None

        sess = self.sess
        fromaddr = sess.from_address
        toaddr = sess.to_address
        tempfilename = sess.tempfilename

        suspect = Suspect(fromaddr, toaddr, tempfilename)
        suspect.recipients = set(sess.recipients)

        if sess.xforward_helo is not None and sess.xforward_addr is not None and sess.xforward_rdns is not None:
            suspect.clientinfo = sess.xforward_helo, sess.xforward_addr, sess.xforward_rdns

        return suspect
开发者ID:wbnxvzqbrfagznggre,项目名称:fuglu,代码行数:20,代码来源:esmtpconnector.py

示例6: open

# 需要导入模块: from fuglu.shared import Suspect [as 别名]
# 或者: from fuglu.shared.Suspect import recipients [as 别名]
    # headers
    if opts.headers:
        for hdrpair in opts.headers:
            name, val = hdrpair.split(':', 1)
            try:
                mailmessage.replace_header(name, val)
            except KeyError:
                mailmessage.add_header(name, val)

    # create tempfile...
    tmpfile = '/tmp/fuglu_dummy_message_in.eml'
    open(tmpfile, 'w').write(mailmessage.as_string())
    logging.info("Input file created as %s" % tmpfile)
    suspect = Suspect(opts.sender, opts.recipients[0], tmpfile)
    suspect.recipients = opts.recipients

    # tags
    if opts.tags:
        for tagpair in opts.tags:
            nme, valstr = tagpair.split(':', 1)
            if valstr == 'TRUE':
                val = True
            elif valstr == 'FALSE':
                val = False
            else:
                val = valstr
            suspect.set_tag(nme, val)

    scannerlist = mc.plugins
    for pluginstance in mc.prependers:
开发者ID:gryphius,项目名称:fuglu,代码行数:32,代码来源:plugdummy.py


注:本文中的fuglu.shared.Suspect.recipients方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。