reflect security = ... in docs and print warning if used

This commit is contained in:
Martin Zimmermann 2014-01-01 22:20:00 +01:00
parent c50fe22eb1
commit 9dd066c6a6
3 changed files with 14 additions and 12 deletions

View File

@ -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

View File

@ -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 =

View File

@ -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 "