예제 #1
0
 def __init__(self):
   self.tempname = None
   self.mailfrom = None
   self.fp = None
   self.bodysize = 0
   self.id = Milter.uniqueID()
   self.user = None
예제 #2
0
	def __init__(self):  # A new instance with each new connection.
		self.id = Milter.uniqueID()  # Integer incremented with each call.
		self.messageToParse = None
		self.level = 0
		self.headercount = 0
		self.attachment_contains_macro = False
		self.size = 0
예제 #3
0
 def __init__(self, conf=None):  # A new instance with each new connection.
     self.id = Milter.uniqueID()
     if conf is not None:
         assert isinstance(conf, config.Config)
         self.conf = conf
     else:
         self.conf = config.Config()
     self.gpgm_gpg = gnupg.GPG(gnupghome=self.conf.gnupghome)
예제 #4
0
파일: milter.py 프로젝트: cirrax/pydspam
    def __init__(self):
        """
        Create a new milter instance.

        """
        self.id = Milter.uniqueID()
        self.message = ''
        self.recipients = []
        self.dspam = None
예제 #5
0
 def __init__(self):  # Each connection calls new S3Milter
     MimeBodyProcessor.__init__(self)
     self.id = Milter.uniqueID()  # Integer incremented with each call.
     self.body_file = StringIO.StringIO()
     self.log_queue = None
     self.postgre_queue = None
     self.start_time = timestamp_start()
     self.log('debug', log_status(module_name=__name__, function_name='__init__',
                                  msg='Launched Milter ID={}'.format(self.id)))
예제 #6
0
 def __init__(self):
     # A new instance with each new connection.
     # each connection runs in its own thread and has its own myMilter
     # instance.  Python code must be thread safe.  This is trivial if only stuff
     # in myMilter instances is referenced.
     self.id = Milter.uniqueID()  # Integer incremented with each call.
     self.message = None
     self.IP = None
     self.port = None
     self.flow = None
     self.scope = None
     self.IPname = None  # Name from a reverse IP lookup
예제 #7
0
    def __init__(self, config):
        self.is_internal_host = None
        self.envlp_from       = EmailAddress(logger=config.logger)
        self.envlp_to         = EmailAddress(logger=config.logger)
        self.hdr_from         = EmailAddress(logger=config.logger)
        self.hdr_to           = EmailAddress(logger=config.logger)

        self.x_mail_domain    = None
        self.x_action_uuid    = None
        self.id               = Milter.uniqueID()
        self.config           = config

        self.config.logger.debug('__init__')
예제 #8
0
    def __init__(self):
        """
        Create a new milter instance.

        """
        self.id = Milter.uniqueID()
        self.message = ''
        self.recipients = []
        self.dspam = None
        self.remove_headers = []
        if self.recipient_delimiter:
            self.recipient_delimiter_re = re.compile('[{}][^@]*'.format(
                re.escape(self.recipient_delimiter)))
        else:
            self.recipient_delimiter_re = None
예제 #9
0
	def __init__( self, config, rule_set ):    # A new instance with each new connection.
		self._oldExceptionHook = sys.excepthook;
		sys.excepthook = self.OnException;

		self.id = Milter.uniqueID();    # Integer incremented with each call.
		self.Message = AttrDict();    # Stores current known email information
		self.ActiveRuleSet = rule_set;
		self.Config = config;

		LogPattern = '%T %c |{}| %m'.format(self.id);
		self.log = ChannelLogger( LogPattern, self.Config.logchannels);

		# AllLoggingOutput will contain all log messages for this instance, regardless
		# of debug channel settings for use with debugging and exception catching
		self.AllLoggingOutput = StringIO();
		self.log.AddDestination(LogPattern, 'all', self.AllLoggingOutput);
예제 #10
0
 def __init__(self):
     self.mailfrom = None
     self.id = Milter.uniqueID()
     # we don't want config used to change during a connection
     self.conf = config
예제 #11
0
 def __init__(self):
     self.log = logfile
     self.id = Milter.uniqueID()
예제 #12
0
파일: tumilter.py 프로젝트: k0ste/tumilter
 def __init__(self):
   self.tocc = 0
   self.id = Milter.uniqueID()
   self.recipients = 2
예제 #13
0
	def __init__(self, user, fail_pass=False, dspamc_opts=None):
		self.user, self.dspamc_opts = user, dspamc_opts or list()
		self.fail_action = Milter.TEMPFAIL if not fail_pass else Milter.ACCEPT
		self.state = 'ready' # ready, busy
		self.dspamc_procs = dict()
		self._log = MilterLogFilter.getLogger(Milter.uniqueID())
예제 #14
0
 def __init__(self):
     # Integer incremented with each call.
     self.id = Milter.uniqueID()
예제 #15
0
 def __init__(self):  # A new instance with each new connection.
     self.id = Milter.uniqueID()  # Integer incremented with each call.
     self.fp = None
예제 #16
0
 def __init__(self):
   self.tempname = None
   self.mailfrom = None
   self.fp = None
   self.bodysize = 0
   self.id = Milter.uniqueID()
예제 #17
0
 def __init__(self):
   self.mailfrom = None
   self.id = Milter.uniqueID()
   # we don't want config used to change during a connection
   self.conf = config
예제 #18
0
 def __init__(self): 
     self.id = Milter.uniqueID()  
예제 #19
0
 def __init__(self):
     self.mailfrom = None  # sender in SMTP form
     self.id = Milter.uniqueID()
예제 #20
0
	def __init__ (self):
		self.mailfrom = None        # sender in SMTP form
		self.id = Milter.uniqueID()
예제 #21
0
 def __init__(self):  # A new instance with each new connection.
     self.id = Milter.uniqueID()  # Integer incremented with each call.
     self.messageToParse = None
     self.level = 0
     self.headercount = 0
     self.size = 0
예제 #22
0
 def __init__(self):
     self.__id = Milter.uniqueID()
     self.__mail_from = ""
     self.__header = None
     self.__fp = None
     self.__user = False
예제 #23
0
 def __init__(self):  # A new instance with each new connection.
     self.id = Milter.uniqueID()  # Integer incremented with each call.
     self.fp = None
예제 #24
0
 def __init__(self):
     """An instance of this class is created for every email"""
     self.id = Milter.uniqueID()
     self.fp = io.StringIO()
     self.data = {}
     self.xmpp_message = ""