jkaberg / mailinabox-sogo

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
17 stars 5 forks source link

Specify utf-8 file format for management/daemon.py #6

Closed amoskyler closed 7 years ago

amoskyler commented 7 years ago

After googling around a bit it seems the errors I've experienced relate to the python library reading some invalid characters - manually specifying the encoding of the file in the daemon.py alleviates the issue - I'm not sure what specifically about running it in a service caused it to break.

jkaberg commented 7 years ago

As per PEP 0263 we should have an # -*- coding: utf-8 -*- at the top of each python file to enforce UTF-8. Would you mind trying that first (and removing your fix)?

This is actully missing from upstream, and was an oversight on my part altho I'm not seeing this issue in my local builds.

amoskyler commented 7 years ago

You are absolutely correct - per my test (I only tested daemon.py) removing the explicit encoding parameter and replacing it with a file comment at the top allowed the daemon to started correctly from systemctl.

jkaberg commented 7 years ago

Thanks 😄