From 9dd066c6a6412b0065e35f96de76f28cc0973279 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Wed, 1 Jan 2014 22:20:00 +0100 Subject: [PATCH] reflect security = ... in docs and print warning if used --- docs/docs/configuration/server.rst | 10 +++++----- docs/example.conf | 14 +++++++------- isso/core.py | 2 ++ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/docs/configuration/server.rst b/docs/docs/configuration/server.rst index a209494..67be002 100644 --- a/docs/docs/configuration/server.rst +++ b/docs/docs/configuration/server.rst @@ -157,7 +157,7 @@ also can moderate (=activate or delete) comments. Don't forget to configure password = host = localhost port = 465 - ssl = on + security = ssl to = from = @@ -174,10 +174,10 @@ host port SMTP port -ssl - use SSL to connect to the server. Python probably does not validate the - certificate. Needs research, though. But you should use a dedicated - email account anyways. +security + use a secure connection to the server, possible values: *none*, *starttls* + or *ssl*. Python 2.X probably does not validate certificates (needs + research). But you should use a dedicated email account anyways. to recipient address, e.g. your email address diff --git a/docs/example.conf b/docs/example.conf index 70d5a07..9028995 100644 --- a/docs/example.conf +++ b/docs/example.conf @@ -1,5 +1,5 @@ -# Isso configuration file -# vim: set filetype=ini +# Isso configuration file +# vim: set filetype=ini [general] @@ -20,7 +20,7 @@ name = host = http://localhost/ # time range that allows users to edit/remove their own comments. -# It supports years, weeks, days, hours, minutes, seconds. +# It supports years, weeks, days, hours, minutes, seconds. # 3h45m12s equals to 3 hours, 45 minutes and 12 seconds. max-age = 15m @@ -80,10 +80,10 @@ host = localhost # SMTP port port = 465 -# use SSL to connect to the server. Python probably does not validate the -# certificate. Needs research, though. But you should use a dedicated email -# account anyways. -ssl = on +# use a secure connection to the server, possible values: "none", "starttls" +# or "ssl". Python 2.X probably does not validate certificates (needs +# research). But you should use a dedicated email account anyways. +security = ssl # recipient address, e.g. your email address to = diff --git a/isso/core.py b/isso/core.py index f0a8b00..bbb41cf 100644 --- a/isso/core.py +++ b/isso/core.py @@ -148,6 +148,8 @@ class Config: logger.warn("no such option: [%s] %s", *item) if item in (("server", "host"), ("server", "port")): logger.warn("use `listen = http://$host:$port` instead") + if item == ("smtp", "ssl"): + logger.warn("use `security = none | starttls | ssl` instead") if rv.get("smtp", "username") and not rv.get("general", "notify"): logger.warn(("SMTP is no longer enabled by default, add "