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

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)
set_flags(int) -> None
Set flags for filter capabilities; OR of one or more of:
ADDHDRS - filter may add headers
CHGBODY - filter may replace body
CHGFROM - filter may replace body
ADDRCPT - filter may add recipients
DELRCPT - filter may delete recipients
CHGHDRS - filter may change/delete headers

src/p/y/pymilter-1.0/sample.py   pymilter(Download)
  socketname = os.getenv("HOME") + "/pythonsock"
  Milter.factory = sampleMilter
  Milter.set_flags(Milter.CHGBODY + Milter.CHGHDRS + Milter.ADDHDRS)
  print """To use this with sendmail, add the following to sendmail.cf:
 

src/m/i/milter-0.8.18/bms.py   milter(Download)
  if srs or len(discard_users) > 0 or smart_alias or dspam_userdir:
    flags = flags + Milter.DELRCPT
  Milter.set_flags(flags)
  socket.setdefaulttimeout(60)
  milter_log.info("bms milter startup")

src/m/i/milter-0.8.18/spfmilter.py   milter(Download)
if __name__ == "__main__":
  Milter.factory = spfMilter
  Milter.set_flags(Milter.CHGHDRS + Milter.ADDHDRS)
  global config
  config = read_config(['spfmilter.cfg','/etc/mail/spfmilter.cfg'])

src/p/y/pymilter-1.0/milter-template.py   pymilter(Download)
  flags += Milter.ADDRCPT
  flags += Milter.DELRCPT
  Milter.set_flags(flags)       # tell Sendmail which features we use
  print "%s milter startup" % time.strftime('%Y%b%d %H:%M:%S')
  sys.stdout.flush()

src/m/i/milter-0.8.18/dkim-milter.py   milter(Download)
if __name__ == "__main__":
  Milter.factory = dkimMilter
  Milter.set_flags(Milter.CHGHDRS + Milter.ADDHDRS)
  global config
  config = read_config(['dkim-milter.cfg','/etc/mail/dkim-milter.cfg'])

src/p/g/pgpmilter-HEAD/pgpmilter.py   pgpmilter(Download)
  Milter.factory = pgpMilter
  # we don't modify mails, so no flags
  Milter.set_flags(0)
  Milter.runmilter("pgpmilter",socket,timeout)
  bt.join()