[Web] Set default relayhost to 0 when adding a mailbox; add missing lang strings

master
andryyy 2021-07-29 14:37:27 +02:00
parent 21cb3f67b3
commit fcbd4e762d
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
4 changed files with 6 additions and 2 deletions

View File

@ -291,7 +291,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
<?php
}
?>
<option value="" <?=($result['relayhost'] == "0") ? 'selected' : null;?>>None</option>
<option value="" <?=($result['relayhost'] == "0") ? 'selected' : null;?>><?=$lang['edit']['none_inherit'];?></option>
</select>
</div>
</div>
@ -718,7 +718,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
<?php
}
?>
<option value="" <?=($result['attributes']['relayhost'] == "0") ? 'selected' : null;?>>None</option>
<option value="" <?=($result['attributes']['relayhost'] == "0" || empty($result['attributes']['relayhost'])) ? 'selected' : null;?>><?=$lang['edit']['none_inherit'];?></option>
</select>
<p class="visible-xs" style="margin: 0;padding: 0">&nbsp;</p>
<small class="help-block"><?=$lang['edit']['mailbox_relayhost_info'];?></small>

View File

@ -956,6 +956,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
$imap_access = (isset($_data['imap_access'])) ? intval($_data['imap_access']) : intval($MAILBOX_DEFAULT_ATTRIBUTES['imap_access']);
$pop3_access = (isset($_data['pop3_access'])) ? intval($_data['pop3_access']) : intval($MAILBOX_DEFAULT_ATTRIBUTES['pop3_access']);
$smtp_access = (isset($_data['smtp_access'])) ? intval($_data['smtp_access']) : intval($MAILBOX_DEFAULT_ATTRIBUTES['smtp_access']);
$relayhost = (isset($_data['relayhost'])) ? intval($_data['relayhost']) : 0;
$quarantine_notification = (isset($_data['quarantine_notification'])) ? strval($_data['quarantine_notification']) : strval($MAILBOX_DEFAULT_ATTRIBUTES['quarantine_notification']);
$quarantine_category = (isset($_data['quarantine_category'])) ? strval($_data['quarantine_category']) : strval($MAILBOX_DEFAULT_ATTRIBUTES['quarantine_category']);
$quota_b = ($quota_m * 1048576);
@ -968,6 +969,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
'imap_access' => strval($imap_access),
'pop3_access' => strval($pop3_access),
'smtp_access' => strval($smtp_access),
'relayhost' => strval($relayhost),
'passwd_update' => time(),
'mailbox_format' => strval($MAILBOX_DEFAULT_ATTRIBUTES['mailbox_format']),
'quarantine_notification' => strval($quarantine_notification),

View File

@ -568,6 +568,7 @@
"mins_interval": "Intervall (min)",
"multiple_bookings": "Mehrfaches Buchen",
"nexthop": "Next Hop",
"none_inherit": "Keine Auswahl / Erben",
"password": "Passwort",
"password_repeat": "Passwort wiederholen",
"previous": "Vorherige Seite",

View File

@ -570,6 +570,7 @@
"mbox_rl_info": "This rate limit is applied on the SASL login name, it matches any \"from\" address used by the logged-in user. A mailbox rate limit overrides a domain-wide rate limit.",
"mins_interval": "Interval (min)",
"multiple_bookings": "Multiple bookings",
"none_inherit": "None / Inherit",
"nexthop": "Next hop",
"password": "Password",
"password_repeat": "Confirmation password (repeat)",