[Web] Do not allow to create a domain where domain = mailcow_hostname
This commit is contained in:
parent
a0d2e34433
commit
e69b6db877
@ -402,6 +402,13 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if ($domain == $MAILCOW_HOSTNAME) {
|
||||||
|
$_SESSION['return'] = array(
|
||||||
|
'type' => 'danger',
|
||||||
|
'msg' => sprintf($lang['danger']['domain_matches_hostname'], htmlspecialchars($domain))
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
$stmt = $pdo->prepare("INSERT INTO `domain` (`domain`, `description`, `aliases`, `mailboxes`, `maxquota`, `quota`, `backupmx`, `active`, `relay_all_recipients`)
|
$stmt = $pdo->prepare("INSERT INTO `domain` (`domain`, `description`, `aliases`, `mailboxes`, `maxquota`, `quota`, `backupmx`, `active`, `relay_all_recipients`)
|
||||||
VALUES (:domain, :description, :aliases, :mailboxes, :maxquota, :quota, :backupmx, :active, :relay_all_recipients)");
|
VALUES (:domain, :description, :aliases, :mailboxes, :maxquota, :quota, :backupmx, :active, :relay_all_recipients)");
|
||||||
|
@ -296,6 +296,7 @@ $lang['edit']['delete2duplicates'] = 'Lösche Duplikate im Ziel';
|
|||||||
$lang['edit']['delete1'] = 'Lösche Nachricht nach Übertragung vom Quell-Server';
|
$lang['edit']['delete1'] = 'Lösche Nachricht nach Übertragung vom Quell-Server';
|
||||||
$lang['edit']['delete2'] = 'Lösche Nachrichten von Ziel-Server, die nicht auf Quell-Server vorhanden sind';
|
$lang['edit']['delete2'] = 'Lösche Nachrichten von Ziel-Server, die nicht auf Quell-Server vorhanden sind';
|
||||||
|
|
||||||
|
$lang['add']['domain_matches_hostname'] = 'Domain %s darf nicht dem Hostnamen entsprechen';
|
||||||
$lang['add']['domain'] = 'Domain';
|
$lang['add']['domain'] = 'Domain';
|
||||||
$lang['add']['active'] = 'Aktiv';
|
$lang['add']['active'] = 'Aktiv';
|
||||||
$lang['add']['multiple_bookings'] = 'Mehrfaches Buchen möglich';
|
$lang['add']['multiple_bookings'] = 'Mehrfaches Buchen möglich';
|
||||||
|
@ -300,6 +300,7 @@ $lang['edit']['delete2duplicates'] = 'Delete duplicates on destination';
|
|||||||
$lang['edit']['delete1'] = 'Delete from source when completed';
|
$lang['edit']['delete1'] = 'Delete from source when completed';
|
||||||
$lang['edit']['delete2'] = 'Delete messages on destination that are not on source';
|
$lang['edit']['delete2'] = 'Delete messages on destination that are not on source';
|
||||||
|
|
||||||
|
$lang['add']['domain_matches_hostname'] = 'Domain %s matches hostname';
|
||||||
$lang['add']['domain'] = 'Domain';
|
$lang['add']['domain'] = 'Domain';
|
||||||
$lang['add']['active'] = 'Active';
|
$lang['add']['active'] = 'Active';
|
||||||
$lang['add']['multiple_bookings'] = 'Multiple bookings';
|
$lang['add']['multiple_bookings'] = 'Multiple bookings';
|
||||||
|
Loading…
Reference in New Issue
Block a user