mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-02-19 02:38:48 +00:00
[SOGo] use python bootstrapper to start SOGo container
This commit is contained in:
@@ -538,6 +538,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
$relay_unknown_only = (isset($_data['relay_unknown_only'])) ? intval($_data['relay_unknown_only']) : $DOMAIN_DEFAULT_ATTRIBUTES['relay_unknown_only'];
|
||||
$backupmx = (isset($_data['backupmx'])) ? intval($_data['backupmx']) : $DOMAIN_DEFAULT_ATTRIBUTES['backupmx'];
|
||||
$gal = (isset($_data['gal'])) ? intval($_data['gal']) : $DOMAIN_DEFAULT_ATTRIBUTES['gal'];
|
||||
$ldap_gal = (isset($_data['gal'])) ? intval($_data['ldap_gal']) : $DOMAIN_DEFAULT_ATTRIBUTES['ldap_gal'];
|
||||
if ($relay_all_recipients == 1) {
|
||||
$backupmx = '1';
|
||||
}
|
||||
@@ -593,8 +594,8 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
':domain' => '%@' . $domain
|
||||
));
|
||||
// save domain
|
||||
$stmt = $pdo->prepare("INSERT INTO `domain` (`domain`, `description`, `aliases`, `mailboxes`, `defquota`, `maxquota`, `quota`, `backupmx`, `gal`, `active`, `relay_unknown_only`, `relay_all_recipients`)
|
||||
VALUES (:domain, :description, :aliases, :mailboxes, :defquota, :maxquota, :quota, :backupmx, :gal, :active, :relay_unknown_only, :relay_all_recipients)");
|
||||
$stmt = $pdo->prepare("INSERT INTO `domain` (`domain`, `description`, `aliases`, `mailboxes`, `defquota`, `maxquota`, `quota`, `backupmx`, `gal`, `ldap_gal`, `active`, `relay_unknown_only`, `relay_all_recipients`)
|
||||
VALUES (:domain, :description, :aliases, :mailboxes, :defquota, :maxquota, :quota, :backupmx, :gal, :ldap_gal, :active, :relay_unknown_only, :relay_all_recipients)");
|
||||
$stmt->execute(array(
|
||||
':domain' => $domain,
|
||||
':description' => $description,
|
||||
@@ -605,6 +606,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
':quota' => $quota,
|
||||
':backupmx' => $backupmx,
|
||||
':gal' => $gal,
|
||||
':ldap_gal' => $ldap_gal,
|
||||
':active' => $active,
|
||||
':relay_unknown_only' => $relay_unknown_only,
|
||||
':relay_all_recipients' => $relay_all_recipients
|
||||
@@ -1551,9 +1553,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
$attr['rl_value'] = (!empty($_data['rl_value'])) ? $_data['rl_value'] : "";
|
||||
$attr['active'] = isset($_data['active']) ? intval($_data['active']) : 1;
|
||||
$attr['gal'] = (isset($_data['gal'])) ? intval($_data['gal']) : 1;
|
||||
$attr['ldap_gal'] = (isset($_data['ldap_gal'])) ? intval($_data['ldap_gal']) : 1;
|
||||
$attr['backupmx'] = (isset($_data['backupmx'])) ? intval($_data['backupmx']) : 0;
|
||||
$attr['relay_all_recipients'] = (isset($_data['relay_all_recipients'])) ? intval($_data['relay_all_recipients']) : 0;
|
||||
$attr['relay_unknown_only'] = (isset($_data['relay_unknown_only'])) ? intval($_data['relay_unknown_only']) : 0;
|
||||
$attr['relay_unknown_only'] = (isset($_data['relay_unknown_only'])) ? intval($_data['relay_unknown_only']) : 0;
|
||||
$attr['dkim_selector'] = (isset($_data['dkim_selector'])) ? $_data['dkim_selector'] : "dkim";
|
||||
$attr['key_size'] = isset($_data['key_size']) ? intval($_data['key_size']) : 2048;
|
||||
|
||||
@@ -2626,6 +2629,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
$is_now = mailbox('get', 'domain_details', $domain);
|
||||
if (!empty($is_now)) {
|
||||
$gal = (isset($_data['gal'])) ? intval($_data['gal']) : $is_now['gal'];
|
||||
$ldap_gal = (isset($_data['ldap_gal'])) ? intval($_data['ldap_gal']) : $is_now['ldap_gal'];
|
||||
$description = (!empty($_data['description']) && isset($_SESSION['acl']['domain_desc']) && $_SESSION['acl']['domain_desc'] == "1") ? $_data['description'] : $is_now['description'];
|
||||
(int)$relayhost = (isset($_data['relayhost']) && isset($_SESSION['acl']['domain_relayhost']) && $_SESSION['acl']['domain_relayhost'] == "1") ? intval($_data['relayhost']) : intval($is_now['relayhost']);
|
||||
$tags = (is_array($_data['tags']) ? $_data['tags'] : array());
|
||||
@@ -2642,10 +2646,12 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
$stmt = $pdo->prepare("UPDATE `domain` SET
|
||||
`description` = :description,
|
||||
`gal` = :gal
|
||||
`ldap_gal` = :ldap_gal
|
||||
WHERE `domain` = :domain");
|
||||
$stmt->execute(array(
|
||||
':description' => $description,
|
||||
':gal' => $gal,
|
||||
':ldap_gal' => $ldap_gal,
|
||||
':domain' => $domain
|
||||
));
|
||||
// save tags
|
||||
@@ -2678,6 +2684,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
$active = (isset($_data['active'])) ? intval($_data['active']) : $is_now['active'];
|
||||
$backupmx = (isset($_data['backupmx'])) ? intval($_data['backupmx']) : $is_now['backupmx'];
|
||||
$gal = (isset($_data['gal'])) ? intval($_data['gal']) : $is_now['gal'];
|
||||
$ldap_gal = (isset($_data['ldap_gal'])) ? intval($_data['ldap_gal']) : $is_now['ldap_gal'];
|
||||
$relay_all_recipients = (isset($_data['relay_all_recipients'])) ? intval($_data['relay_all_recipients']) : $is_now['relay_all_recipients'];
|
||||
$relay_unknown_only = (isset($_data['relay_unknown_only'])) ? intval($_data['relay_unknown_only']) : $is_now['relay_unknown_only'];
|
||||
$relayhost = (isset($_data['relayhost'])) ? intval($_data['relayhost']) : $is_now['relayhost'];
|
||||
@@ -2792,6 +2799,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
`relay_unknown_only` = :relay_unknown_only,
|
||||
`backupmx` = :backupmx,
|
||||
`gal` = :gal,
|
||||
`ldap_gal` = :ldap_gal,
|
||||
`active` = :active,
|
||||
`quota` = :quota,
|
||||
`defquota` = :defquota,
|
||||
@@ -2806,6 +2814,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
':relay_unknown_only' => $relay_unknown_only,
|
||||
':backupmx' => $backupmx,
|
||||
':gal' => $gal,
|
||||
':ldap_gal' => $ldap_gal,
|
||||
':active' => $active,
|
||||
':quota' => $quota,
|
||||
':defquota' => $defquota,
|
||||
@@ -2890,9 +2899,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
$attr['rl_value'] = (!empty($_data['rl_value'])) ? $_data['rl_value'] : "";
|
||||
$attr['active'] = isset($_data['active']) ? intval($_data['active']) : 1;
|
||||
$attr['gal'] = (isset($_data['gal'])) ? intval($_data['gal']) : 1;
|
||||
$attr['ldap_gal'] = (isset($_data['ldap_gal'])) ? intval($_data['ldap_gal']) : 0;
|
||||
$attr['backupmx'] = (isset($_data['backupmx'])) ? intval($_data['backupmx']) : 0;
|
||||
$attr['relay_all_recipients'] = (isset($_data['relay_all_recipients'])) ? intval($_data['relay_all_recipients']) : 0;
|
||||
$attr['relay_unknown_only'] = (isset($_data['relay_unknown_only'])) ? intval($_data['relay_unknown_only']) : 0;
|
||||
$attr['relay_unknown_only'] = (isset($_data['relay_unknown_only'])) ? intval($_data['relay_unknown_only']) : 0;
|
||||
$attr['dkim_selector'] = (isset($_data['dkim_selector'])) ? $_data['dkim_selector'] : "dkim";
|
||||
$attr['key_size'] = isset($_data['key_size']) ? intval($_data['key_size']) : 2048;
|
||||
|
||||
@@ -4673,6 +4683,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
`relay_unknown_only`,
|
||||
`backupmx`,
|
||||
`gal`,
|
||||
`ldap_gal`,
|
||||
`active`
|
||||
FROM `domain` WHERE `domain`= :domain");
|
||||
$stmt->execute(array(
|
||||
@@ -4733,6 +4744,8 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
$domaindata['backupmx_int'] = $row['backupmx'];
|
||||
$domaindata['gal'] = $row['gal'];
|
||||
$domaindata['gal_int'] = $row['gal'];
|
||||
$domaindata['ldap_gal'] = $row['ldap_gal'];
|
||||
$domaindata['ldap_gal_int'] = $row['ldap_gal'];
|
||||
$domaindata['rl'] = $rl;
|
||||
$domaindata['active'] = $row['active'];
|
||||
$domaindata['active_int'] = $row['active'];
|
||||
|
||||
@@ -4,7 +4,7 @@ function init_db_schema()
|
||||
try {
|
||||
global $pdo;
|
||||
|
||||
$db_version = "27012025_1555";
|
||||
$db_version = "16052025_1245";
|
||||
|
||||
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
|
||||
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||
@@ -259,6 +259,7 @@ function init_db_schema()
|
||||
"relayhost" => "VARCHAR(255) NOT NULL DEFAULT '0'",
|
||||
"backupmx" => "TINYINT(1) NOT NULL DEFAULT '0'",
|
||||
"gal" => "TINYINT(1) NOT NULL DEFAULT '1'",
|
||||
"ldap_gal" => "TINYINT(1) NOT NULL DEFAULT '0'",
|
||||
"relay_all_recipients" => "TINYINT(1) NOT NULL DEFAULT '0'",
|
||||
"relay_unknown_only" => "TINYINT(1) NOT NULL DEFAULT '0'",
|
||||
"created" => "DATETIME(0) NOT NULL DEFAULT NOW(0)",
|
||||
@@ -560,6 +561,21 @@ function init_db_schema()
|
||||
),
|
||||
"attr" => "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC"
|
||||
),
|
||||
"service_settings" => array(
|
||||
"cols" => array(
|
||||
"key" => "VARCHAR(255) NOT NULL",
|
||||
"value" => "LONGTEXT NOT NULL",
|
||||
"type" => "DATETIME(0) NOT NULL DEFAULT NOW(0)",
|
||||
"created" => "DATETIME(0) NOT NULL DEFAULT NOW(0)",
|
||||
"modified" => "DATETIME ON UPDATE CURRENT_TIMESTAMP",
|
||||
),
|
||||
"keys" => array(
|
||||
"primary" => array(
|
||||
"" => array("key")
|
||||
)
|
||||
),
|
||||
"attr" => "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC"
|
||||
),
|
||||
"settingsmap" => array(
|
||||
"cols" => array(
|
||||
"id" => "INT NOT NULL AUTO_INCREMENT",
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
"full_name": "Full name",
|
||||
"gal": "Global Address List",
|
||||
"gal_info": "The GAL contains all objects of a domain and cannot be edited by any user. Free/busy information in SOGo is missing, if disabled! <b>Restart SOGo to apply changes.</b>",
|
||||
"ldap_gal": "Global LDAP Address List",
|
||||
"ldap_gal_info": "",
|
||||
"generate": "generate",
|
||||
"goto_ham": "Learn as <span class=\"text-success\"><b>ham</b></span>",
|
||||
"goto_null": "Silently discard mail",
|
||||
@@ -681,6 +683,8 @@
|
||||
"full_name": "Full name",
|
||||
"gal": "Global Address List",
|
||||
"gal_info": "The GAL contains all objects of a domain and cannot be edited by any user. Free/busy information in SOGo is missing, if disabled! <b>Restart SOGo to apply changes.</b>",
|
||||
"ldap_gal": "Global LDAP Address List",
|
||||
"ldap_gal_info": "",
|
||||
"generate": "generate",
|
||||
"grant_types": "Grant types",
|
||||
"hostname": "Hostname",
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<input type="hidden" value="0" name="active">
|
||||
<input type="hidden" value="0" name="backupmx">
|
||||
<input type="hidden" value="0" name="gal">
|
||||
<input type="hidden" value="0" name="ldap_gal">
|
||||
<input type="hidden" value="0" name="relay_all_recipients">
|
||||
<input type="hidden" value="0" name="relay_unknown_only">
|
||||
<div class="row mb-4">
|
||||
@@ -130,6 +131,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="offset-sm-2 col-sm-10">
|
||||
<div class="form-check">
|
||||
<label><input type="checkbox" class="form-check-input" value="1" name="ldap_gal"{% if result.ldap_gal == '1' %} checked{% endif %}> {{ lang.edit.ldap_gal }}</label>
|
||||
<small class="text-muted">{{ lang.edit.ldap_gal_info|raw }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row mb-2">
|
||||
<div class="offset-sm-2 col-sm-10">
|
||||
|
||||
@@ -387,6 +387,7 @@
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" data-cached-form="true" data-id="add_domain" role="form">
|
||||
<input type="hidden" value="0" name="gal">
|
||||
<input type="hidden" value="0" name="ldap_gal">
|
||||
<input type="hidden" value="0" name="active">
|
||||
<input type="hidden" value="0" name="backupmx">
|
||||
<input type="hidden" value="0" name="relay_all_recipients">
|
||||
@@ -460,6 +461,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="offset-sm-2 col-sm-10">
|
||||
<div class="form-check">
|
||||
<label><input type="checkbox" class="form-check-input" id="addDomain_ldap_gal" value="1" name="ldap_gal"> {{ lang.edit.ldap_gal }}</label>
|
||||
<small class="text-muted">{{ lang.edit.ldap_gal_info|raw }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row mb-4">
|
||||
<div class="offset-sm-2 col-sm-10">
|
||||
@@ -600,6 +609,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="offset-sm-2 col-sm-10">
|
||||
<div class="form-check">
|
||||
<label><input type="checkbox" class="form-check-input" value="1" name="ldap_gal"> {{ lang.add.ldap_gal }}</label>
|
||||
<small class="text-muted">{{ lang.add.ldap_gal_info|raw }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="offset-sm-2 col-sm-10">
|
||||
<div class="form-check">
|
||||
|
||||
Reference in New Issue
Block a user