Пример #1
0
 def start(self):
     SMTPServer.__init__(
         self,
         ('0.0.0.0', 25),
         None
     )
     asyncore.loop()
Пример #2
0
 def start(self):
     SMTPServer.__init__(self, ('0.0.0.0', 465),
                         None,
                         require_authentication=True,
                         ssl=True,
                         certfile='examples/server.crt',
                         keyfile='examples/server.key',
                         credential_validator=FakeCredentialValidator(),
                         maximum_execution_time=1.0)
     asyncore.loop()
Пример #3
0
    def __init__(self, *args, **kwargs):
        self.ssl_out_only = False
        if kwargs.has_key('ssl_out_only'):
            self.ssl_out_only = kwargs.pop('ssl_out_only')

        self.debug = False
        if kwargs.has_key('debug'):
            self.debug = kwargs.pop('debug')

        kwargs['credential_validator'] = StoreCredentials()
        SMTPServer.__init__(self, *args, **kwargs)
Пример #4
0
 def start(self):
     SMTPServer.__init__(
         self,
         ('0.0.0.0', 465),
         None,
         require_authentication=True,
         ssl=True,
         certfile='examples/server.crt',
         keyfile='examples/server.key',
         credential_validator=FakeCredentialValidator(),
         maximum_execution_time = 1.0
     )
     asyncore.loop()
Пример #5
0
 def __init__(self,
              localaddr,
              remoteaddr,
              ssl=False,
              certfile=None,
              keyfile=None,
              ssl_version=ssl.PROTOCOL_SSLv23,
              require_authentication=False,
              credential_validator=None,
              maximum_execution_time=30,
              process_count=5):
     SMTPServer.__init__(self, localaddr, remoteaddr, ssl, certfile,
                         keyfile, ssl_version, require_authentication,
                         credential_validator, maximum_execution_time,
                         process_count)
     self.routes = []
     self.logger = logging.getLogger(smtproutes.LOG_NAME)
Пример #6
0
 def __init__(self, localaddr, remoteaddr, ssl=False, certfile=None, keyfile=None, ssl_version=ssl.PROTOCOL_SSLv23, require_authentication=False, credential_validator=None, maximum_execution_time=30, process_count=5):
     SMTPServer.__init__(self,
                                 localaddr,
                                 remoteaddr,
                                 ssl=ssl,
                                 certfile=certfile,
                                 keyfile=keyfile,
                                 ssl_version=ssl_version,
                                 require_authentication=require_authentication,
                                 credential_validator=credential_validator,
                                 maximum_execution_time=maximum_execution_time,
                                 process_count=process_count)
     threading.Thread.__init__(self)
     self._message_file_name = 'dummy.msg'
     self._lock = threading.Lock()
     with open(self._message_file_name, 'wt') as msg_file:
         msg_file.truncate(0)
Пример #7
0
 def __init__(self,
              credentials,
              bind_pair,
              queue,
              handled_domain='',
              open_relay=False,
              server_banner=''):
     self.__credentials_validator = None
     if credentials:
         self.__credentials_validator = CredentialsValidator(credentials)
     self.__domain = handled_domain
     self.__queue = queue
     self.__open_relay = open_relay
     SMTPServer.__init__(self,
                         bind_pair,
                         None,
                         credential_validator=self.__credentials_validator,
                         banner=server_banner,
                         rcptto_callback=self.check_relaying)
Пример #8
0
 def __init__(self, localaddr, remoteaddr, ssl=False, certfile=None, keyfile=None, ssl_version=ssl.PROTOCOL_SSLv23, require_authentication=False, credential_validator=None, maximum_execution_time=30, process_count=5):
     SMTPServer.__init__(self, localaddr, remoteaddr, ssl, certfile, keyfile, ssl_version, require_authentication, credential_validator, maximum_execution_time, process_count)
     self.routes = []
     self.logger = logging.getLogger( smtproutes.LOG_NAME )
Пример #9
0
 def __init__(self, cmd_args, *args, **kwargs):
     SMTPServer.__init__(self, *args, **kwargs)
     self.cmd_args = cmd_args
     bs_host, bs_port = cmd_args.beanstalk
     self.beanstalk = beanstalkc.Connection(host = bs_host, port = bs_port)
Пример #10
0
 def start(self):
     SMTPServer.__init__(self, ('0.0.0.0', 25), None)
     asyncore.loop()
Пример #11
0
 def start(self):
     SMTPServer.__init__(self,('10.38.1.18', 25), None,  require_authentication=True, credential_validator=FakeCredentialValidator(), process_count=1)
     asyncore.loop()