fix running just pop server
This commit is contained in:
parent
811f93a6d1
commit
089507c0ac
@ -16,6 +16,10 @@ Mail server for single user #asyncio #python
|
||||
pipenv install
|
||||
sudo $(pipenv --venv)/bin/python ./run.py --certfile /etc/letsencrypt/live/your.domain.com/fullchain.pem --keyfile /etc/letsencrypt/live/your.domain.com/privkey.pem /var/mails --password_hash <PASSWORD_HASH_FROM_ABOVE>
|
||||
|
||||
## Just pop server for debugging
|
||||
|
||||
pipenv run python -m mail4one.pop3 /path/to/mails 9995 your_password
|
||||
|
||||
## Nextups
|
||||
|
||||
* Support sending emails - Also support for popular services like mailgun/sendgrid
|
||||
|
@ -288,5 +288,20 @@ async def a_main(*args, **kwargs):
|
||||
await server.serve_forever()
|
||||
|
||||
|
||||
def debug_main():
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
import sys
|
||||
|
||||
_, mails_path, port, password = sys.argv
|
||||
|
||||
mails_path = Path(mails_path)
|
||||
port = int(port)
|
||||
password_hash = add_season(password.encode(), Session.SALT).hex()
|
||||
|
||||
asyncio.run(a_main(mails_path, port, password_hash=password_hash))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(a_main(Path("/tmp/mails"), 9995, password_hash=add_season(b"dummy", Session.SALT).hexdigest()))
|
||||
debug_main()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user