change admin menu url to smtp-server
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form method="POST" action="/pymta-manager/settings_update" id="settingsForm">
|
||||
<form method="POST" action="/smtp-server/settings_update" id="settingsForm">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header"><h5 class="mb-0"><i class="bi bi-server me-2"></i>Server Configuration</h5></div>
|
||||
<div class="card-body">
|
||||
@@ -206,7 +206,7 @@
|
||||
<div class="form-text mb-3">The "custom" certificate: self-signed on first run, or your own uploaded cert/key above.</div>
|
||||
<hr>
|
||||
<p class="mb-2">Which certificate each TLS listener uses — <code>custom</code> (above), or one of the two Let's
|
||||
Encrypt certificates managed on the <a href="/pymta-manager/letsencrypt">Let's Encrypt</a> page. Independent
|
||||
Encrypt certificates managed on the <a href="/smtp-server/letsencrypt">Let's Encrypt</a> page. Independent
|
||||
per listener, e.g. an HTTP-01 cert for mail while the dashboard keeps a DNS-01 or custom cert.</p>
|
||||
<div class="row">
|
||||
<div class="col-md-4"><div class="mb-3"><label class="form-label">SMTP (direct-TLS, 465)</label>
|
||||
@@ -327,7 +327,7 @@
|
||||
if (!file) return;
|
||||
const formData = new FormData();
|
||||
formData.append('cert_file', file);
|
||||
fetch('/pymta-manager/api/settings/upload_cert', { method: 'POST', body: formData })
|
||||
fetch('/smtp-server/api/settings/upload_cert', { method: 'POST', body: formData })
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
if (data.status === 'success') { document.querySelector('[name="TLS.tls_cert_file"]').value = data.filepath; showToast('Certificate uploaded', 'success'); }
|
||||
@@ -340,7 +340,7 @@
|
||||
if (!file) return;
|
||||
const formData = new FormData();
|
||||
formData.append('key_file', file);
|
||||
fetch('/pymta-manager/api/settings/upload_key', { method: 'POST', body: formData })
|
||||
fetch('/smtp-server/api/settings/upload_key', { method: 'POST', body: formData })
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
if (data.status === 'success') { document.querySelector('[name="TLS.tls_key_file"]').value = data.filepath; showToast('Key uploaded', 'success'); }
|
||||
@@ -350,14 +350,14 @@
|
||||
|
||||
function testDatabaseConnection() {
|
||||
const url = document.getElementById('databaseUrl').value;
|
||||
fetch('/pymta-manager/api/settings/test_database', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({url}) })
|
||||
fetch('/smtp-server/api/settings/test_database', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({url}) })
|
||||
.then(r => r.json())
|
||||
.then(data => showToast(data.message || (data.status === 'success' ? 'Connection successful!' : 'Failed to connect'), data.status === 'success' ? 'success' : 'danger'))
|
||||
.catch(() => showToast('Failed to test database connection', 'danger'));
|
||||
}
|
||||
|
||||
function getPublicIP() {
|
||||
fetch('/pymta-manager/api/settings/get_public_ip')
|
||||
fetch('/smtp-server/api/settings/get_public_ip')
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
if (data.ip) { document.querySelector('[name="DKIM.spf_server_ip"]').value = data.ip; showToast('Public IP fetched', 'success'); }
|
||||
@@ -369,7 +369,7 @@
|
||||
const path = document.querySelector('input[name="Attachments.attachments_path"]').value;
|
||||
const feedback = document.getElementById('attachments-path-feedback');
|
||||
if (!feedback) return;
|
||||
fetch('/pymta-manager/test_attachments_path', { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: `path=${encodeURIComponent(path)}` })
|
||||
fetch('/smtp-server/test_attachments_path', { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: `path=${encodeURIComponent(path)}` })
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
feedback.innerHTML = data.message + (data.success ? `<br><small class="text-muted">Absolute path: ${data.absolute_path}</small>` : '');
|
||||
|
||||
Reference in New Issue
Block a user