Preparation for usage on vessel, pyinstaller
This commit is contained in:
parent
3c10f3c70c
commit
1db908399e
4 changed files with 14 additions and 4 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -2,4 +2,7 @@ venv/
|
||||||
*.pyc
|
*.pyc
|
||||||
__pycache__/
|
__pycache__/
|
||||||
maildir/
|
maildir/
|
||||||
*.pem
|
*.pem
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
*.spec
|
|
@ -1 +1,2 @@
|
||||||
aiosmtpd
|
aiosmtpd
|
||||||
|
pyopenssl
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
maildir = maildir
|
maildir = maildir
|
||||||
|
|
||||||
[USERS]
|
[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 asyncio
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
from classes.smtpdhandler import SmtpdHandler
|
from classes.smtpdhandler import SmtpdHandler
|
||||||
from classes.config import Config
|
from classes.config import Config
|
||||||
from classes.authenticator import Authenticator
|
from classes.authenticator import Authenticator
|
||||||
|
@ -12,10 +14,14 @@ from classes.ssl import SSL
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
log = logging.basicConfig()
|
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()
|
loop = asyncio.new_event_loop()
|
||||||
asyncio.set_event_loop(loop)
|
asyncio.set_event_loop(loop)
|
||||||
|
|
||||||
config = Config("settings.ini")
|
config = Config(args.config)
|
||||||
authenticator = Authenticator(config)
|
authenticator = Authenticator(config)
|
||||||
handler = SmtpdHandler(config)
|
handler = SmtpdHandler(config)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue