Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(59)  |  Call(59)  |  Derive(0)  |  Import(0)

src/m/i/milter-0.8.18/bms.py   milter(Download)
      if ip4re.match(hostname):
        self.log("REJECT: numeric hello name:",hostname)
        self.setreply('550','5.7.1','hello name cannot be numeric ip')
        return Milter.REJECT
      if hostname in config.hello_blacklist:
        self.log("REJECT: spam from self:",hostname)
        self.setreply('550','5.7.1',
      self.log("auto-whitelist:",len(auto_whitelist),' entries')
      self.log("cbv_cache:",len(cbv_cache),' entries')
      self.setreply('550','5.7.1','%d unreachable objects'%n)
      return Milter.REJECT
    # HELO not allowed after MAIL FROM
        self.log("REJECT: pretend MTA at ",self.connectip,
            " sending MAIL FROM ",f)
        self.setreply('550','5.7.1',
        'Your PC is trying to send a DSN even though it is not an MTA.',
        'If you are running MS Outlook, it is broken.  If you want to',
        except:
          self.log("REJECT: bad MFROM signature",self.canon_from)
          self.setreply('550','5.7.1','Bad MFROM signature')
          return Milter.REJECT
      if self.internal_connection:

src/m/i/milter-0.8.18/spfmilter.py   milter(Download)
      if ip4re.match(hostname):
        self.log("REJECT: numeric hello name:",hostname)
        self.setreply('550','5.7.1','hello name cannot be numeric ip')
        return Milter.REJECT
    return Milter.CONTINUE
    if not self.hello_name:
      self.log('REJECT: missing HELO')
      self.setreply('550','5.7.1',"It's polite to say helo first.")
      return Milter.REJECT
    self.mailfrom = f
          self.log("REJECT: SMTP user",self.user,
              "at",self.connectip,"not authorized for domain",domain)
          self.setreply('550','5.7.1',
            'SMTP user %s is not authorized to send from domain %s.' %
            (self.user,domain)
        if policy != 'OK':
          self.log('REJECT: hello SPF: %s 550 %s' % (hres,htxt))
          self.setreply('550','5.7.1',htxt,
            "The hostname given in your MTA's HELO response is not listed",
            "as a legitimate MTA in the SPF records for your domain.  If you",
        if not policy or policy == 'REJECT':
          self.log('REJECT: SPF %s %i %s' % (res,code,txt))
          self.setreply(str(code),'5.7.1',txt)
          # A proper SPF fail error message would read:
          # forger.biz [1.2.3.4] is not allowed to send mail with the domain

src/m/i/milter-0.8.18/dkim-milter.py   milter(Download)
        else:
          t = 'Invalid'
        self.setreply('550','5.7.1',
          '%s DKIM signature for %s with ADSP dkim=%s'%(t,self.author,p))
        self.log('REJECT: %s DKIM signature'%t)

src/d/s/dspam-milter-0.3.3/dspam/milter.py   dspam-milter(Download)
                'confidence={2[confidence]}'.format(
                    self.id, queue_id, final_results))
            self.setreply('550', '5.7.1', 'Message is {0[class]}'.format(
                final_results))
            return Milter.REJECT

src/p/y/pymilter-1.0/milter-template.py   pymilter(Download)
    if heloname.find('.') < 0:	# illegal helo name
      # NOTE: example only - too many real braindead clients to reject on this
      self.setreply('550','5.7.1','Sheesh people!  Use a proper helo name!')
      return Milter.REJECT
 

src/p/g/pgpmilter-HEAD/pgpmilter.py   pgpmilter(Download)
      return Milter.ACCEPT 
    if len(currentBody) > maxmsglen:
      self.setreply('550','5.7.1','We only accept PGP encrypted mail. PGP header not found within %s first characters of body' % maxmsglen)
      return Milter.REJECT
    return Milter.CONTINUE
 
  # end of mail
  def eom(self):
    self.setreply('550','5.7.1','We only accept PGP encrypted mail')