Bernd Wurst commited on 2023-05-17 12:02:18
Zeige 2 geänderte Dateien mit 8 Einfügungen und 8 Löschungen.
... | ... |
@@ -77,19 +77,19 @@ foreach ($domains as $id => $dom) { |
77 | 77 |
<input type="submit" value="Speichern" /> |
78 | 78 |
</span>'; |
79 | 79 |
|
80 |
- if ($dom['type'] != 'none') { |
|
80 |
+ if ($dom['type'] != 'none' && $dom['dns'] == 1) { |
|
81 | 81 |
$check_dmarc = ($dom['dkim'] == 'dmarc' ? ' checked="checked"' : ''); |
82 | 82 |
$check_dkim = ($dom['dkim'] == 'dkim' ? ' checked="checked"' : ''); |
83 | 83 |
$check_dkimoff = ($dom['dkim'] == 'none' ? ' checked="checked"' : ''); |
84 |
- $buttons .= ' <p><label for="dkim-select-'.$id.'">DKIM-Einstellung: </label><select name="dkim-'.$id.'" id="dkim-select-'.$id.'" class="autosubmit"> |
|
84 |
+ $buttons .= ' <select name="dkim-'.$id.'" id="dkim-select-'.$id.'" class="autosubmit"> |
|
85 | 85 |
<option value="dmarc" '.($dom['dkim'] == 'dmarc' ? 'selected' : '').'>DKIM + DMARC</option> |
86 | 86 |
<option value="dkim" '.($dom['dkim'] == 'dkim' ? 'selected' : '').'>Nur DKIM</option> |
87 | 87 |
<option value="none" '.($dom['dkim'] == 'none' ? 'selected' : '').'>DKIM ausgeschaltet</option> |
88 | 88 |
</select> |
89 |
- <input class="hidden" type="submit" value="Speichern" /></p> |
|
90 |
- </span>'; |
|
89 |
+ <input class="hidden" type="submit" value="Speichern" /> |
|
90 |
+ '; |
|
91 | 91 |
} else { |
92 |
- $buttons .= '<p>Sie können keine DKIM-Einstellung vornehmen, wenn der Mail-Empfang ausgeschaltet ist.</p>'; |
|
92 |
+ //$buttons .= 'Sie können keine DKIM-Einstellung vornehmen, wenn der Mail-Empfang ausgeschaltet ist.'; |
|
93 | 93 |
} |
94 | 94 |
output("<tr{$trextra}><td>{$dom['name']}</td><td>".html_form('vmail_domainchange', 'domainchange', '', $buttons)."</td><td>{$notice}</td></tr>\n"); |
95 | 95 |
if (array_key_exists($id, $subdomains)) { |
... | ... |
@@ -107,8 +107,7 @@ foreach ($domains as $id => $dom) { |
107 | 107 |
<label for="option-'.$id.'-manual">Manuell</label> |
108 | 108 |
<input type="radio" name="option-'.$id.'" id="option-'.$id.'-off" value="off"'.($edit_disabled ? ' disabled="disabled"' : '').'/> |
109 | 109 |
<label for="option-'.$id.'-off">Ausgeschaltet</label> |
110 |
- </span> |
|
111 |
- <p>Für Subdomains können keine DKIM-Einstellungen gesetzt werden.</p>'; |
|
110 |
+ </span>'; |
|
112 | 111 |
output("<tr{$trextra}><td>{$subdom['name']}.{$dom['name']}</td><td>{$buttons}</td><td>Subdomains können nur von Admins geändert werden!</td></tr>\n"); |
113 | 112 |
} |
114 | 113 |
} |
... | ... |
@@ -466,7 +466,7 @@ function domainsettings($only_domain=null) |
466 | 466 |
$subdomains = []; |
467 | 467 |
|
468 | 468 |
// Domains |
469 |
- $result = db_query("SELECT d.id, CONCAT_WS('.',d.domainname,d.tld) AS name, d.mail, d.dkim, d.mailserver_lock, m.id AS m_id, v.id AS v_id FROM kundendaten.domains AS d LEFT JOIN mail.virtual_mail_domains AS v ON (d.id=v.domain AND v.hostname IS NULL) LEFT JOIN mail.custom_mappings AS m ON (d.id=m.domain AND m.subdomain IS NULL) WHERE d.useraccount=:uid OR m.uid=:uid ORDER BY CONCAT_WS('.',d.domainname,d.tld);", [":uid" => $uid]); |
|
469 |
+ $result = db_query("SELECT d.id, CONCAT_WS('.',d.domainname,d.tld) AS name, d.mail, d.dns, d.dkim, d.mailserver_lock, m.id AS m_id, v.id AS v_id FROM kundendaten.domains AS d LEFT JOIN mail.virtual_mail_domains AS v ON (d.id=v.domain AND v.hostname IS NULL) LEFT JOIN mail.custom_mappings AS m ON (d.id=m.domain AND m.subdomain IS NULL) WHERE d.useraccount=:uid OR m.uid=:uid ORDER BY CONCAT_WS('.',d.domainname,d.tld);", [":uid" => $uid]); |
|
470 | 470 |
|
471 | 471 |
while ($mydom = $result->fetch()) { |
472 | 472 |
if (! array_key_exists($mydom['id'], $domains)) { |
... | ... |
@@ -477,6 +477,7 @@ function domainsettings($only_domain=null) |
477 | 477 |
"name" => $mydom['name'], |
478 | 478 |
"type" => $mydom['mail'], |
479 | 479 |
"dkim" => $mydom['dkim'], |
480 |
+ "dns" => $mydom['dns'], |
|
480 | 481 |
"mailserver_lock" => $mydom['mailserver_lock'], |
481 | 482 |
]; |
482 | 483 |
if ($only_domain && $only_domain == $mydom['id']) { |
483 | 484 |