Preparation for usage on vessel, pyinstaller
This commit is contained in:
parent
3c10f3c70c
commit
1db908399e
4 changed files with 14 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -3,3 +3,6 @@ venv/
|
|||
__pycache__/
|
||||
maildir/
|
||||
*.pem
|
||||
build/
|
||||
dist/
|
||||
*.spec
|
|
@ -1 +1,2 @@
|
|||
aiosmtpd
|
||||
pyopenssl
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
maildir = maildir
|
||||
|
||||
[USERS]
|
||||
test = $argon2id$v=19$m=65536,t=3,p=4$0ZfYHQjV5IlHxtPqKP5O7A$LZ/vfXP1QoymVaPwwhH/0+FOK+Ek5fwr7YC98/E402A
|
||||
test = $6$GCsvefFgXbOm7hyT$uYal5FY5iMsksr2zCUHIAfR1i7rqLEqJxNbqAlcBmK/3npjeLZsfvRKn8KI7yAiWLZL6.8xWRAh0KxslEfed80
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ from aiosmtpd.smtp import AuthResult
|
|||
import asyncio
|
||||
import logging
|
||||
|
||||
from argparse import ArgumentParser
|
||||
|
||||
from classes.smtpdhandler import SmtpdHandler
|
||||
from classes.config import Config
|
||||
from classes.authenticator import Authenticator
|
||||
|
@ -12,10 +14,14 @@ from classes.ssl import SSL
|
|||
if __name__ == "__main__":
|
||||
log = logging.basicConfig()
|
||||
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument("-c", "--config", help="Path to config file", default="settings.ini")
|
||||
args = parser.parse_args()
|
||||
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
config = Config("settings.ini")
|
||||
config = Config(args.config)
|
||||
authenticator = Authenticator(config)
|
||||
handler = SmtpdHandler(config)
|
||||
|
||||
|
|
Loading…
Reference in a new issue