diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php index af4f4be7..18db3fa9 100644 --- a/data/web/inc/functions.mailbox.inc.php +++ b/data/web/inc/functions.mailbox.inc.php @@ -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)"); diff --git a/data/web/lang/lang.de.php b/data/web/lang/lang.de.php index f71a653b..2f508e53 100644 --- a/data/web/lang/lang.de.php +++ b/data/web/lang/lang.de.php @@ -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']['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']['active'] = 'Aktiv'; $lang['add']['multiple_bookings'] = 'Mehrfaches Buchen möglich'; diff --git a/data/web/lang/lang.en.php b/data/web/lang/lang.en.php index e3ed0d8b..6a0d7419 100644 --- a/data/web/lang/lang.en.php +++ b/data/web/lang/lang.en.php @@ -300,6 +300,7 @@ $lang['edit']['delete2duplicates'] = 'Delete duplicates on destination'; $lang['edit']['delete1'] = 'Delete from source when completed'; $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']['active'] = 'Active'; $lang['add']['multiple_bookings'] = 'Multiple bookings';