Last active
October 30, 2019 09:59
-
-
Save cmouse/efe34ffe9115420584b2727745e486fa to your computer and use it in GitHub Desktop.
Get settings from dovecot documentation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lxml import etree | |
import urllib.request | |
import urllib.parse | |
import sys | |
from html2text import html2text | |
def get_named_setting(name, url="https://doc.dovecot.org/settings/dovecot_core_settings/"): | |
f = urllib.request.urlopen(url) | |
parser = etree.HTMLParser() | |
tree = etree.parse(f, parser) | |
name = name.replace("_","-") | |
res = tree.xpath("//div[@id='%s']" % name) | |
return html2text(etree.tostring(res[0]).decode("utf-8")) | |
if __name__ == "__main__": | |
if len(sys.argv) < 2: | |
print("Usage: %s setting" % sys.argv[0]) | |
sys.exit(1) | |
print(get_named_setting(sys.argv[1])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~$ python3 dovemanual.py auth_cache_verify_password_with_worker | |
## `auth_cache_verify_password_with_worker`¶ | |
New in version v2.2.34. | |
* Default: `no` | |
* Values: [Boolean](../../configuration_manual/config_file/boolean/#boolean) | |
The auth master process by default is responsible for the hash verifications. | |
Setting this to yes moves the verification to auth-worker processes. This | |
allows distributing the hash calculations to multiple CPU cores, which could | |
make sense if strong hashes are used. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment