c3lf-system-3/core/mail/socket.py
jedi 3709b5dd29
Some checks failed
Test / test (push) Failing after 3m3s
stash
2024-12-05 05:19:07 +01:00

31 lines
795 B
Python

from abc import ABCMeta
from aiosmtpd.controller import BaseController, UnixSocketMixin
from aiosmtpd.lmtp import LMTP
class BaseAsyncController(BaseController, metaclass=ABCMeta):
def __init__(
self,
handler,
loop,
**SMTP_parameters,
):
super().__init__(
handler,
loop,
**SMTP_parameters,
)
def serve(self):
return self._create_server()
class UnixSocketLMTPController(UnixSocketMixin, BaseAsyncController):
def factory(self):
return LMTP(self.handler)
# def _trigger_server(self): # pragma: no-unixsock
# # Prevent confusion on which _trigger_server() to invoke.
# # Or so LGTM.com claimed
# UnixSocketMixin._trigger_server(self)