[Web] Database schema test
parent
b81930e416
commit
2bdc3f94c0
|
@ -39,7 +39,7 @@ query = SELECT IF(EXISTS(
|
|||
SELECT CONCAT('%u', '@', target_domain) FROM alias_domain
|
||||
WHERE alias_domain='%d'
|
||||
)
|
||||
) AND mailbox.tls_enforce_in = '1' AND mailbox.active = '1'
|
||||
) AND json_extract(`attributes`, '$.tls_enforce_in') = '1' AND mailbox.active = '1'
|
||||
), 'reject_plaintext_session', NULL) AS 'tls_enforce_in';
|
||||
EOF
|
||||
|
||||
|
@ -58,7 +58,7 @@ query = SELECT GROUP_CONCAT(transport SEPARATOR '') AS transport_maps
|
|||
WHERE alias_domain = '%d'
|
||||
)
|
||||
)
|
||||
AND mailbox.tls_enforce_out = '1'
|
||||
AND json_extract(`attributes`, '$.tls_enforce_out') = '1'
|
||||
AND mailbox.active = '1'
|
||||
), 'smtp_enforced_tls:', 'smtp:') AS 'transport'
|
||||
UNION ALL
|
||||
|
|
|
@ -511,8 +511,8 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
|||
if (in_array($address, $gotos)) {
|
||||
continue;
|
||||
}
|
||||
$domain = idn_to_ascii(substr(strrchr($address, '@'), 1));
|
||||
$local_part = substr($address, 0, strripos($address, '@'));
|
||||
$domain = idn_to_ascii(substr(strstr($address, '@'), 1));
|
||||
$local_part = strstr($address, '@', true);
|
||||
$address = $local_part.'@'.$domain;
|
||||
$stmt = $pdo->prepare("SELECT `address` FROM `alias`
|
||||
WHERE `address`= :address OR `address` IN (
|
||||
|
@ -1713,8 +1713,8 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
|||
$gotos = array_filter($gotos);
|
||||
$goto = implode(",", $gotos);
|
||||
}
|
||||
$domain = idn_to_ascii(substr(strrchr($address, '@'), 1));
|
||||
$local_part = substr($address, 0, strripos($address, '@'));
|
||||
$domain = idn_to_ascii(substr(strstr($address, '@'), 1));
|
||||
$local_part = strstr($address, '@', true);
|
||||
if (!hasDomainAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $domain)) {
|
||||
$_SESSION['return'] = array(
|
||||
'type' => 'danger',
|
||||
|
@ -3470,7 +3470,7 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
|||
$addresses = $_data['address'];
|
||||
}
|
||||
foreach ($addresses as $address) {
|
||||
$local_part = substr($address, 0, strripos($address, '@'));
|
||||
$local_part = strstr($address, '@', true);
|
||||
$domain = mailbox('get', 'alias_details', $address)['domain'];
|
||||
try {
|
||||
$stmt = $pdo->prepare("SELECT `goto` FROM `alias` WHERE `address` = :address");
|
||||
|
|
Loading…
Reference in New Issue