Snawoot / postfix-mta-sts-resolver

Daemon which provides TLS client policy for Postfix via socketmap, according to domain MTA-STS policy
MIT License
120 stars 23 forks source link

Snap cannot access configuration file #106

Open sparrow2009 opened 2 months ago

sparrow2009 commented 2 months ago

First of all I want to say thank you for this valuable tool.

But: Using the snap fails for me due to missing file access permissions (no configured plug for the required configuration file):

postfix-mta-sts-resolver.daemon
2024-08-13 15:58:51 INFO     MAIN: MTA-STS daemon starting...
Traceback (most recent call last):
  File "/snap/postfix-mta-sts-resolver/420/bin/mta-sts-daemon", line 33, in <module>
    sys.exit(load_entry_point('postfix-mta-sts-resolver==1.4.0', 'console_scripts', 'mta-sts-daemon')())
  File "/snap/postfix-mta-sts-resolver/420/lib/python3.6/site-packages/postfix_mta_sts_resolver/daemon.py", line 134, in main
    cfg = utils.load_config(args.config)
  File "/snap/postfix-mta-sts-resolver/420/lib/python3.6/site-packages/postfix_mta_sts_resolver/utils.py", line 136, in load_config
    with open(filename, 'rb') as cfg_file:
PermissionError: [Errno 13] Permission denied: '/etc/mta-sts-daem
on.yml'

As an aside: Wouldn't it be a natural fit deploying the daemon as a snap service?

Snawoot commented 2 months ago

The snap is poorly made and could use some rewrite. It would be nice if someone can do it.