Beispiel #1
0
 def __init__(self):
   self.tempname = None
   self.mailfrom = None
   self.fp = None
   self.bodysize = 0
   self.id = Milter.uniqueID()
   self.user = None
Beispiel #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
Beispiel #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)
Beispiel #4
0
    def __init__(self):
        """
        Create a new milter instance.

        """
        self.id = Milter.uniqueID()
        self.message = ''
        self.recipients = []
        self.dspam = None
Beispiel #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)))
Beispiel #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
Beispiel #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__')
Beispiel #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
Beispiel #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);
Beispiel #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
Beispiel #11
0
 def __init__(self):
     self.log = logfile
     self.id = Milter.uniqueID()
Beispiel #12
0
 def __init__(self):
   self.tocc = 0
   self.id = Milter.uniqueID()
   self.recipients = 2
Beispiel #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())
Beispiel #14
0
 def __init__(self):
     # Integer incremented with each call.
     self.id = Milter.uniqueID()
 def __init__(self):  # A new instance with each new connection.
     self.id = Milter.uniqueID()  # Integer incremented with each call.
     self.fp = None
Beispiel #16
0
 def __init__(self):
   self.tempname = None
   self.mailfrom = None
   self.fp = None
   self.bodysize = 0
   self.id = Milter.uniqueID()
Beispiel #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
Beispiel #18
0
 def __init__(self): 
     self.id = Milter.uniqueID()  
 def __init__(self):
     self.mailfrom = None  # sender in SMTP form
     self.id = Milter.uniqueID()
	def __init__ (self):
		self.mailfrom = None        # sender in SMTP form
		self.id = Milter.uniqueID()
Beispiel #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
Beispiel #22
0
 def __init__(self):
     self.__id = Milter.uniqueID()
     self.__mail_from = ""
     self.__header = None
     self.__fp = None
     self.__user = False
Beispiel #23
0
 def __init__(self):  # A new instance with each new connection.
     self.id = Milter.uniqueID()  # Integer incremented with each call.
     self.fp = None
Beispiel #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 = ""