mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-05 17:37:03 +00:00
smtpsrv: Fail to listen if there are no certificates configured
The server is written assuming there's at least one valid SSL/TLS certificate. For example, it unconditionally advertises STARTTLS, and only supports AUTH over TLS. This patch makes the server fail to listen if there are no certificates configured, so the users don't accidentally run an unsupported configuration.
This commit is contained in:
@@ -5,6 +5,12 @@ set -e
|
||||
|
||||
init
|
||||
|
||||
# This should fail, as it has no certificates.
|
||||
rm config/certs/testserver/*.pem
|
||||
if chasquid -v=2 --logfile=.logs/chasquid.log --config_dir=config; then
|
||||
fail "chasquid should not start without certificates"
|
||||
fi
|
||||
|
||||
generate_certs_for testserver
|
||||
add_user user@testserver secretpassword
|
||||
add_user someone@testserver secretpassword
|
||||
|
||||
Reference in New Issue
Block a user