Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add pop3.enabled setting #791

Open
wants to merge 6 commits into
base: stretch-unstable
from

Conversation

@decentral1se
Copy link
Member

commented Sep 6, 2019

The problem

Using a non-default configuration is needed to setup pop3.

See YunoHost/issues#1393.

Solution

Allow to configure pop3 through a setting.

Following approach in #773.

PR Status

A work in progress ...

How to test

$ yunohost settings set pop3.enabled -v True
$ yunohost settings set pop3.enabled -v False

Then have a look at your /etc/dovecot/dovecot.conf and check the "protocols = ..." line.

Also check that dpkg -l reports that dovecot-pop3d is installed.

Validation

  • Principle agreement 0/2 :
  • Quick review 0/1 :
  • Simple test 0/1 :
  • Deep review 0/1 :

@decentral1se decentral1se changed the title Add pop3 settings WIP: Add pop3 setting Sep 6, 2019

@decentral1se decentral1se changed the title WIP: Add pop3 setting WIP: Add pop3.enabled setting Sep 6, 2019

@alexAubin alexAubin added this to the 3.8.x milestone Sep 10, 2019

@decentral1se decentral1se force-pushed the decentral1se:add-pop3-setting branch from b9309d6 to 9b4cbb1 Sep 11, 2019

@decentral1se decentral1se changed the title WIP: Add pop3.enabled setting Add pop3.enabled setting Sep 11, 2019

@decentral1se decentral1se force-pushed the decentral1se:add-pop3-setting branch from 86e0d8b to f23e175 Sep 11, 2019

@decentral1se
Copy link
Member Author

left a comment

Took another pass on this. Thanks for reviews.

src/yunohost/settings.py Outdated Show resolved Hide resolved
@Psycojoker

This comment has been minimized.

Copy link
Member

commented Sep 15, 2019

LGTM on principle

@decentral1se

This comment has been minimized.

Copy link
Member Author

commented Sep 16, 2019

Done some manual testing. I'm struggling to understand how I can use ynh_package_install in the settings.py inside the hook. There are no other examples of this being done. I would have to source the helpers script and call it from the python layer? That feels weird too. Should I not just run the ynh_package_install dovecot-pop3d from the do_post_regen in .../conf-regen/25-dovecot where others also make use of the helpers (from other scripts, like 19-postfix, for example)?

@decentral1se decentral1se changed the title Add pop3.enabled setting WIP: Add pop3.enabled setting Sep 16, 2019

@alexAubin

This comment has been minimized.

Copy link
Member

commented Sep 16, 2019

Hmeh I dunno ... I think I would simply run apt install/remove <the package> with the other options (force-confdef, force-confold, non-interactive frontend...)

@decentral1se decentral1se force-pushed the decentral1se:add-pop3-setting branch from e5eebd2 to 18c686f Sep 17, 2019

decentral1se added 6 commits Sep 6, 2019
Add is_boolean and use when calling settings_set
The CLI always passes the value as a string so we need to manage this
type casting step by hand.
Remove comment
This isn't an issue AFAICT, since the hooks manage this themselves
already. Hence, I assume this is an old comment and out of date.

@decentral1se decentral1se force-pushed the decentral1se:add-pop3-setting branch from 18c686f to cac27e2 Sep 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.