1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-24 07:37:04 +00:00

SMTP Relay Host stub progress

This commit is contained in:
David Duque 2020-04-13 18:29:14 +01:00
parent 6e462f6523
commit c004e55c76
No known key found for this signature in database
GPG Key ID: 2F327738A3C0AE3A
2 changed files with 31 additions and 5 deletions

View File

@ -334,7 +334,7 @@ def ssl_get_status():
# What domains can we provision certificates for? What unexpected problems do we have? # What domains can we provision certificates for? What unexpected problems do we have?
provision, cant_provision = get_certificates_to_provision(env, show_valid_certs=False) provision, cant_provision = get_certificates_to_provision(env, show_valid_certs=False)
# What's the current status of TLS certificates on all of the domain? # What's the current status of TLS certificates on all of the domain?
domains_status = get_web_domains_info(env) domains_status = get_web_domains_info(env)
domains_status = [ domains_status = [
@ -520,6 +520,16 @@ def privacy_status_set():
utils.write_settings(config, env) utils.write_settings(config, env)
return "OK" return "OK"
@app.route('/system/smtp/relay', methods=["GET"])
@authorized_personnel_only
def smtp_relay_get():
pass
@app.route('/system/smtp/relay', methods=["POST"])
@authorized_personnel_only
def smtp_relay_set():
pass
# MUNIN # MUNIN
@app.route('/munin/') @app.route('/munin/')

View File

@ -2,10 +2,14 @@
</style> </style>
<script> <script>
function checklocks() { function checkfields() {
let use_relay = document.getElementById("use_relay").checked
let use_auth = document.getElementById("relay_use_auth").checked let use_auth = document.getElementById("relay_use_auth").checked
document.getElementById("relay_auth_user").disabled = !use_auth
document.getElementById("relay_auth_pass").disabled = !use_auth document.getElementById("relay_host").disabled = !use_relay
document.getElementById("relay_use_auth").disabled = !use_relay
document.getElementById("relay_auth_user").disabled = !use_relay && !use_auth
document.getElementById("relay_auth_pass").disabled = !use_relay && !use_auth
} }
</script> </script>
@ -22,6 +26,18 @@
<form class="form-horizontal" role="form" onsubmit="return false;"> <form class="form-horizontal" role="form" onsubmit="return false;">
<div class="form-group"> <div class="form-group">
<table style="width: 600px"> <table style="width: 600px">
<tr>
<td>
<label for="use_relay" class="col-sm-1 control-label">Use Relay?</label>
</td>
<td>
<div class="col-sm-10">
<input type="checkbox" id="use_relay" name="use_relay" value="true"
onclick="checkfields();">
</div>
</td>
</tr>
<tr> <tr>
<td> <td>
<label for="relay_host" class="col-sm-1 control-label">Hostname</label> <label for="relay_host" class="col-sm-1 control-label">Hostname</label>
@ -41,7 +57,7 @@
<td> <td>
<div class="col-sm-10"> <div class="col-sm-10">
<input checked type="checkbox" id="relay_use_auth" name="relay_use_auth" value="true" <input checked type="checkbox" id="relay_use_auth" name="relay_use_auth" value="true"
onclick="checklocks();"> onclick="checkfields();">
</div> </div>
</td> </td>
</tr> </tr>