當前位置: 首頁>>代碼示例>>Python>>正文


Python Suspect.clientinfo方法代碼示例

本文整理匯總了Python中fuglu.shared.Suspect.clientinfo方法的典型用法代碼示例。如果您正苦於以下問題:Python Suspect.clientinfo方法的具體用法?Python Suspect.clientinfo怎麽用?Python Suspect.clientinfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在fuglu.shared.Suspect的用法示例。


在下文中一共展示了Suspect.clientinfo方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_suspect

# 需要導入模塊: from fuglu.shared import Suspect [as 別名]
# 或者: from fuglu.shared.Suspect import clientinfo [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
        tempfilename = sess.tempfilename
        suspect = Suspect(fromaddr, sess.recipients, tempfilename)

        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:oasiswork,項目名稱:fuglu,代碼行數:17,代碼來源:milterconnector.py

示例2: get_suspect

# 需要導入模塊: from fuglu.shared import Suspect [as 別名]
# 或者: from fuglu.shared.Suspect import clientinfo [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

示例3: _make_dummy_suspect

# 需要導入模塊: from fuglu.shared import Suspect [as 別名]
# 或者: from fuglu.shared.Suspect import clientinfo [as 別名]
 def _make_dummy_suspect(self, senderdomain, clientip, helo='foo.example.com'):
     s = Suspect('[email protected]%s' %
                 senderdomain, '[email protected]', '/dev/null')
     s.clientinfo = (helo, clientip, 'ptr.example.com')
     return s
開發者ID:gryphius,項目名稱:fuglu,代碼行數:7,代碼來源:plugins_domainauth_test.py


注:本文中的fuglu.shared.Suspect.clientinfo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。