[Web] Do not allow to create a domain where domain = mailcow_hostname
This commit is contained in:
@@ -402,6 +402,13 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
||||
);
|
||||
return false;
|
||||
}
|
||||
if ($domain == $MAILCOW_HOSTNAME) {
|
||||
$_SESSION['return'] = array(
|
||||
'type' => 'danger',
|
||||
'msg' => sprintf($lang['danger']['domain_matches_hostname'], htmlspecialchars($domain))
|
||||
);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
$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)");
|
||||
|
Reference in New Issue
Block a user