本文整理汇总了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
示例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
示例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