[Compose] Enable some minimal inits, change or remove some health checks
This commit is contained in:
parent
c63fb8b11a
commit
8741b5f3b1
@ -31,7 +31,10 @@ if (isset($_SESSION['mailcow_cc_role'])) {
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-sm-2" for="goto"><?=$lang['edit']['target_address'];?></label>
|
<label class="control-label col-sm-2" for="goto"><?=$lang['edit']['target_address'];?></label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea class="form-control" autocapitalize="none" autocorrect="off" rows="10" id="goto" name="goto"><?=htmlspecialchars($result['goto']) ?></textarea>
|
<textarea id="textarea_alias_goto" class="form-control" autocapitalize="none" autocorrect="off" rows="10" id="goto" name="goto" required><?= ($result['goto'] != "null@localhost") ? htmlspecialchars($result['goto']) : null; ?></textarea>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label><input id="goto_null" type="checkbox" value="1" name="goto_null" <?= ($result['goto'] == "null@localhost") ? "checked" : null; ?>> <?=$lang['add']['goto_null'];?></label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -324,6 +324,7 @@ function mailbox($_action, $_type, $_data = null) {
|
|||||||
$addresses = array_map('trim', preg_split( "/( |,|;|\n)/", $_data['address']));
|
$addresses = array_map('trim', preg_split( "/( |,|;|\n)/", $_data['address']));
|
||||||
$gotos = array_map('trim', preg_split( "/( |,|;|\n)/", $_data['goto']));
|
$gotos = array_map('trim', preg_split( "/( |,|;|\n)/", $_data['goto']));
|
||||||
$active = intval($_data['active']);
|
$active = intval($_data['active']);
|
||||||
|
$goto_null = intval($_data['goto_null']);
|
||||||
if (empty($addresses[0])) {
|
if (empty($addresses[0])) {
|
||||||
$_SESSION['return'] = array(
|
$_SESSION['return'] = array(
|
||||||
'type' => 'danger',
|
'type' => 'danger',
|
||||||
@ -331,42 +332,47 @@ function mailbox($_action, $_type, $_data = null) {
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (empty($gotos[0])) {
|
if (empty($gotos[0]) && $goto_null == 0) {
|
||||||
$_SESSION['return'] = array(
|
$_SESSION['return'] = array(
|
||||||
'type' => 'danger',
|
'type' => 'danger',
|
||||||
'msg' => sprintf($lang['danger']['goto_empty'])
|
'msg' => sprintf($lang['danger']['goto_empty'])
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
foreach ($gotos as &$goto) {
|
if ($goto_null == "1") {
|
||||||
if (empty($goto)) {
|
$goto = "null@localhost";
|
||||||
continue;
|
}
|
||||||
}
|
else {
|
||||||
$goto_domain = idn_to_ascii(substr(strstr($goto, '@'), 1));
|
foreach ($gotos as &$goto) {
|
||||||
$goto_local_part = strstr($goto, '@', true);
|
if (empty($goto)) {
|
||||||
$goto = $goto_local_part.'@'.$goto_domain;
|
continue;
|
||||||
$stmt = $pdo->prepare("SELECT `username` FROM `mailbox`
|
}
|
||||||
WHERE `kind` REGEXP 'location|thing|group'
|
$goto_domain = idn_to_ascii(substr(strstr($goto, '@'), 1));
|
||||||
AND `username`= :goto");
|
$goto_local_part = strstr($goto, '@', true);
|
||||||
$stmt->execute(array(':goto' => $goto));
|
$goto = $goto_local_part.'@'.$goto_domain;
|
||||||
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
$stmt = $pdo->prepare("SELECT `username` FROM `mailbox`
|
||||||
if ($num_results != 0) {
|
WHERE `kind` REGEXP 'location|thing|group'
|
||||||
$_SESSION['return'] = array(
|
AND `username`= :goto");
|
||||||
'type' => 'danger',
|
$stmt->execute(array(':goto' => $goto));
|
||||||
'msg' => sprintf($lang['danger']['goto_invalid'])
|
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||||
);
|
if ($num_results != 0) {
|
||||||
return false;
|
$_SESSION['return'] = array(
|
||||||
}
|
'type' => 'danger',
|
||||||
if (!filter_var($goto, FILTER_VALIDATE_EMAIL) === true) {
|
'msg' => sprintf($lang['danger']['goto_invalid'])
|
||||||
$_SESSION['return'] = array(
|
);
|
||||||
'type' => 'danger',
|
return false;
|
||||||
'msg' => sprintf($lang['danger']['goto_invalid'])
|
}
|
||||||
);
|
if (!filter_var($goto, FILTER_VALIDATE_EMAIL) === true) {
|
||||||
return false;
|
$_SESSION['return'] = array(
|
||||||
}
|
'type' => 'danger',
|
||||||
|
'msg' => sprintf($lang['danger']['goto_invalid'])
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$gotos = array_filter($gotos);
|
||||||
|
$goto = implode(",", $gotos);
|
||||||
}
|
}
|
||||||
$gotos = array_filter($gotos);
|
|
||||||
$goto = implode(",", $gotos);
|
|
||||||
foreach ($addresses as $address) {
|
foreach ($addresses as $address) {
|
||||||
if (empty($address)) {
|
if (empty($address)) {
|
||||||
continue;
|
continue;
|
||||||
@ -1385,6 +1391,7 @@ function mailbox($_action, $_type, $_data = null) {
|
|||||||
$is_now = mailbox('get', 'alias_details', $address);
|
$is_now = mailbox('get', 'alias_details', $address);
|
||||||
if (!empty($is_now)) {
|
if (!empty($is_now)) {
|
||||||
$active = (isset($_data['active'])) ? intval($_data['active']) : $is_now['active_int'];
|
$active = (isset($_data['active'])) ? intval($_data['active']) : $is_now['active_int'];
|
||||||
|
$goto_null = (isset($_data['goto_null'])) ? intval($_data['goto_null']) : $is_now['goto_null'];
|
||||||
$goto = (!empty($_data['goto'])) ? $_data['goto'] : $is_now['goto'];
|
$goto = (!empty($_data['goto'])) ? $_data['goto'] : $is_now['goto'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1394,30 +1401,33 @@ function mailbox($_action, $_type, $_data = null) {
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if ($goto_null == "1") {
|
||||||
$gotos = array_map('trim', preg_split( "/( |,|;|\n)/", $_data['goto']));
|
$goto = "null@localhost";
|
||||||
foreach ($gotos as &$goto) {
|
}
|
||||||
if (empty($goto)) {
|
else {
|
||||||
continue;
|
$gotos = array_map('trim', preg_split( "/( |,|;|\n)/", $_data['goto']));
|
||||||
}
|
foreach ($gotos as &$goto) {
|
||||||
if (!filter_var($goto, FILTER_VALIDATE_EMAIL)) {
|
if (empty($goto)) {
|
||||||
$_SESSION['return'] = array(
|
continue;
|
||||||
'type' => 'danger',
|
}
|
||||||
'msg' =>sprintf($lang['danger']['goto_invalid'])
|
if (!filter_var($goto, FILTER_VALIDATE_EMAIL)) {
|
||||||
);
|
$_SESSION['return'] = array(
|
||||||
return false;
|
'type' => 'danger',
|
||||||
}
|
'msg' =>sprintf($lang['danger']['goto_invalid'])
|
||||||
if ($goto == $address) {
|
);
|
||||||
$_SESSION['return'] = array(
|
return false;
|
||||||
'type' => 'danger',
|
}
|
||||||
'msg' => sprintf($lang['danger']['alias_goto_identical'])
|
if ($goto == $address) {
|
||||||
);
|
$_SESSION['return'] = array(
|
||||||
return false;
|
'type' => 'danger',
|
||||||
}
|
'msg' => sprintf($lang['danger']['alias_goto_identical'])
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$gotos = array_filter($gotos);
|
||||||
|
$goto = implode(",", $gotos);
|
||||||
}
|
}
|
||||||
$gotos = array_filter($gotos);
|
|
||||||
$goto = implode(",", $gotos);
|
|
||||||
|
|
||||||
$domain = idn_to_ascii(substr(strstr($address, '@'), 1));
|
$domain = idn_to_ascii(substr(strstr($address, '@'), 1));
|
||||||
$local_part = strstr($address, '@', true);
|
$local_part = strstr($address, '@', true);
|
||||||
if (!hasDomainAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $domain)) {
|
if (!hasDomainAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $domain)) {
|
||||||
|
@ -67,7 +67,7 @@ $(document).ready(function() {
|
|||||||
var req_empty = false;
|
var req_empty = false;
|
||||||
$(this).closest("form").find('select, textarea, input').each(function() {
|
$(this).closest("form").find('select, textarea, input').each(function() {
|
||||||
if ($(this).prop('required')) {
|
if ($(this).prop('required')) {
|
||||||
if (!$(this).val()) {
|
if (!$(this).val() && $(this).prop('disabled') === false) {
|
||||||
req_empty = true;
|
req_empty = true;
|
||||||
$(this).addClass('inputMissingAttr');
|
$(this).addClass('inputMissingAttr');
|
||||||
} else {
|
} else {
|
||||||
@ -126,7 +126,7 @@ $(document).ready(function() {
|
|||||||
var req_empty = false;
|
var req_empty = false;
|
||||||
$(this).closest("form").find('select, textarea, input').each(function() {
|
$(this).closest("form").find('select, textarea, input').each(function() {
|
||||||
if ($(this).prop('required')) {
|
if ($(this).prop('required')) {
|
||||||
if (!$(this).val()) {
|
if (!$(this).val() && $(this).prop('disabled') === false) {
|
||||||
req_empty = true;
|
req_empty = true;
|
||||||
$(this).addClass('inputMissingAttr');
|
$(this).addClass('inputMissingAttr');
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
$(document).ready(function() {
|
||||||
|
if ($("#goto_null").is(":checked")) {
|
||||||
|
$('#textarea_alias_goto').prop('disabled', true);
|
||||||
|
}
|
||||||
|
$("#goto_null").click(function( event ) {
|
||||||
|
if ($("#goto_null").is(":checked")) {
|
||||||
|
$('#textarea_alias_goto').prop('disabled', true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#textarea_alias_goto").removeAttr('disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
// http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
|
// http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
|
||||||
function validateEmail(email) {
|
function validateEmail(email) {
|
||||||
|
@ -30,6 +30,15 @@ $(document).ready(function() {
|
|||||||
$('#password2').val(random_passwd);
|
$('#password2').val(random_passwd);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#goto_null").click(function( event ) {
|
||||||
|
if ($("#goto_null").is(":checked")) {
|
||||||
|
$('#textarea_alias_goto').prop('disabled', true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#textarea_alias_goto").removeAttr('disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Log modal
|
// Log modal
|
||||||
$('#logModal').on('show.bs.modal', function(e) {
|
$('#logModal').on('show.bs.modal', function(e) {
|
||||||
var logText = $(e.relatedTarget).data('log-text');
|
var logText = $(e.relatedTarget).data('log-text');
|
||||||
@ -283,6 +292,9 @@ jQuery(function($){
|
|||||||
if (item.is_catch_all == 1) {
|
if (item.is_catch_all == 1) {
|
||||||
item.address = '<div class="label label-default">Catch-All</div> ' + item.address;
|
item.address = '<div class="label label-default">Catch-All</div> ' + item.address;
|
||||||
}
|
}
|
||||||
|
if (item.goto == "null@localhost") {
|
||||||
|
item.goto = '⤷ <span style="font-size:12px" class="glyphicon glyphicon-trash" aria-hidden="true"></span>';
|
||||||
|
}
|
||||||
if (item.in_primary_domain !== "") {
|
if (item.in_primary_domain !== "") {
|
||||||
item.domain = "↳ " + item.domain + " (" + item.in_primary_domain + ")";
|
item.domain = "↳ " + item.domain + " (" + item.in_primary_domain + ")";
|
||||||
}
|
}
|
||||||
|
@ -331,6 +331,7 @@ $lang['edit']['dont_check_sender_acl'] = 'Absender für Domain %s u. Alias-Dom.
|
|||||||
$lang['edit']['multiple_bookings'] = 'Mehrfaches Buchen';
|
$lang['edit']['multiple_bookings'] = 'Mehrfaches Buchen';
|
||||||
$lang['edit']['kind'] = 'Art';
|
$lang['edit']['kind'] = 'Art';
|
||||||
$lang['edit']['resource'] = 'Ressource';
|
$lang['edit']['resource'] = 'Ressource';
|
||||||
|
$lang['edit']['goto_null'] = 'Nachrichten sofort verwerfen';
|
||||||
|
|
||||||
$lang['add']['syncjob'] = 'Sync-Job erstellen';
|
$lang['add']['syncjob'] = 'Sync-Job erstellen';
|
||||||
$lang['add']['syncjob_hint'] = 'Passwörter werden unverschlüsselt abgelegt!';
|
$lang['add']['syncjob_hint'] = 'Passwörter werden unverschlüsselt abgelegt!';
|
||||||
@ -385,6 +386,7 @@ $lang['add']['password'] = 'Passwort';
|
|||||||
$lang['add']['password_repeat'] = 'Passwort (Wiederholung)';
|
$lang['add']['password_repeat'] = 'Passwort (Wiederholung)';
|
||||||
$lang['add']['previous'] = 'Vorherige Seite';
|
$lang['add']['previous'] = 'Vorherige Seite';
|
||||||
$lang['add']['restart_sogo_hint'] = 'Der SOGo Container muss nach dem Hinzufügen einer neuen Domain neugestartet werden!';
|
$lang['add']['restart_sogo_hint'] = 'Der SOGo Container muss nach dem Hinzufügen einer neuen Domain neugestartet werden!';
|
||||||
|
$lang['add']['goto_null'] = 'Nachrichten sofort verwerfen';
|
||||||
|
|
||||||
$lang['login']['title'] = 'Anmeldung';
|
$lang['login']['title'] = 'Anmeldung';
|
||||||
$lang['login']['administration'] = 'Administration';
|
$lang['login']['administration'] = 'Administration';
|
||||||
|
@ -336,6 +336,7 @@ $lang['edit']['dont_check_sender_acl'] = "Disable sender check for domain %s + a
|
|||||||
$lang['edit']['multiple_bookings'] = 'Multiple bookings';
|
$lang['edit']['multiple_bookings'] = 'Multiple bookings';
|
||||||
$lang['edit']['kind'] = 'Kind';
|
$lang['edit']['kind'] = 'Kind';
|
||||||
$lang['edit']['resource'] = 'Resource';
|
$lang['edit']['resource'] = 'Resource';
|
||||||
|
$lang['edit']['goto_null'] = 'Silently discard mail';
|
||||||
|
|
||||||
$lang['add']['syncjob'] = 'Add sync job';
|
$lang['add']['syncjob'] = 'Add sync job';
|
||||||
$lang['add']['syncjob_hint'] = 'Be aware that passwords need to be saved plain-text!';
|
$lang['add']['syncjob_hint'] = 'Be aware that passwords need to be saved plain-text!';
|
||||||
@ -390,6 +391,7 @@ $lang['add']['password'] = 'Password';
|
|||||||
$lang['add']['password_repeat'] = 'Confirmation password (repeat)';
|
$lang['add']['password_repeat'] = 'Confirmation password (repeat)';
|
||||||
$lang['add']['previous'] = 'Previous page';
|
$lang['add']['previous'] = 'Previous page';
|
||||||
$lang['add']['restart_sogo_hint'] = 'You will need to restart the SOGo service container after adding a new domain!';
|
$lang['add']['restart_sogo_hint'] = 'You will need to restart the SOGo service container after adding a new domain!';
|
||||||
|
$lang['add']['goto_null'] = 'Silently discard mail';
|
||||||
|
|
||||||
$lang['login']['title'] = 'Login';
|
$lang['login']['title'] = 'Login';
|
||||||
$lang['login']['administration'] = 'Administration';
|
$lang['login']['administration'] = 'Administration';
|
||||||
|
@ -234,7 +234,10 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-sm-2" for="goto"><?=$lang['add']['target_address'];?></label>
|
<label class="control-label col-sm-2" for="goto"><?=$lang['add']['target_address'];?></label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea autocorrect="off" autocapitalize="none" class="form-control" rows="5" id="goto" name="goto" required></textarea>
|
<textarea id="textarea_alias_goto" autocorrect="off" autocapitalize="none" class="form-control" rows="5" id="goto" name="goto" required></textarea>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label><input id="goto_null" type="checkbox" value="1" name="goto_null"> <?=$lang['add']['goto_null'];?></label>
|
||||||
|
</div>
|
||||||
<p><?=$lang['add']['target_address_info'];?></p>
|
<p><?=$lang['add']['target_address_info'];?></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,18 +1,14 @@
|
|||||||
version: '2.1'
|
version: '2.3'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
unbound-mailcow:
|
unbound-mailcow:
|
||||||
image: mailcow/unbound:1.0
|
image: mailcow/unbound:1.0
|
||||||
build: ./data/Dockerfiles/unbound
|
build: ./data/Dockerfiles/unbound
|
||||||
command: /usr/sbin/unbound
|
command: /usr/sbin/unbound
|
||||||
|
init: true
|
||||||
depends_on:
|
depends_on:
|
||||||
mysql-mailcow:
|
mysql-mailcow:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nslookup", "mailcow.email", "127.0.0.1"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 3s
|
|
||||||
retries: 10
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/conf/unbound/unbound.conf:/etc/unbound/unbound.conf:ro
|
- ./data/conf/unbound/unbound.conf:/etc/unbound/unbound.conf:ro
|
||||||
restart: always
|
restart: always
|
||||||
@ -38,6 +34,7 @@ services:
|
|||||||
- MYSQL_DATABASE=${DBNAME}
|
- MYSQL_DATABASE=${DBNAME}
|
||||||
- MYSQL_USER=${DBUSER}
|
- MYSQL_USER=${DBUSER}
|
||||||
- MYSQL_PASSWORD=${DBPASS}
|
- MYSQL_PASSWORD=${DBPASS}
|
||||||
|
init: true
|
||||||
restart: always
|
restart: always
|
||||||
dns:
|
dns:
|
||||||
- 172.22.1.254
|
- 172.22.1.254
|
||||||
@ -50,9 +47,6 @@ services:
|
|||||||
|
|
||||||
redis-mailcow:
|
redis-mailcow:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
depends_on:
|
|
||||||
unbound-mailcow:
|
|
||||||
condition: service_healthy
|
|
||||||
volumes:
|
volumes:
|
||||||
- redis-vol-1:/data/
|
- redis-vol-1:/data/
|
||||||
restart: always
|
restart: always
|
||||||
@ -66,11 +60,12 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
|
|
||||||
clamd-mailcow:
|
clamd-mailcow:
|
||||||
image: mailcow/clamd:1.2
|
image: mailcow/clamd:1.3
|
||||||
build: ./data/Dockerfiles/clamd
|
build: ./data/Dockerfiles/clamd
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
- SKIP_CLAMD=${SKIP_CLAMD:-n}
|
- SKIP_CLAMD=${SKIP_CLAMD:-n}
|
||||||
|
init: true
|
||||||
dns:
|
dns:
|
||||||
- 172.22.1.254
|
- 172.22.1.254
|
||||||
dns_search: mailcow-network
|
dns_search: mailcow-network
|
||||||
@ -82,11 +77,7 @@ services:
|
|||||||
rspamd-mailcow:
|
rspamd-mailcow:
|
||||||
image: mailcow/rspamd:1.6
|
image: mailcow/rspamd:1.6
|
||||||
build: ./data/Dockerfiles/rspamd
|
build: ./data/Dockerfiles/rspamd
|
||||||
command: >
|
command: "/usr/bin/rspamd -f -u _rspamd -g _rspamd"
|
||||||
/bin/bash -c "
|
|
||||||
sleep 5;
|
|
||||||
/usr/bin/rspamd -f -u _rspamd -g _rspamd
|
|
||||||
"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- nginx-mailcow
|
- nginx-mailcow
|
||||||
volumes:
|
volumes:
|
||||||
@ -97,6 +88,7 @@ services:
|
|||||||
- dkim-vol-1:/data/dkim
|
- dkim-vol-1:/data/dkim
|
||||||
- rspamd-vol-1:/var/lib/rspamd
|
- rspamd-vol-1:/var/lib/rspamd
|
||||||
restart: always
|
restart: always
|
||||||
|
init: true
|
||||||
dns:
|
dns:
|
||||||
- 172.22.1.254
|
- 172.22.1.254
|
||||||
dns_search: mailcow-network
|
dns_search: mailcow-network
|
||||||
@ -142,9 +134,6 @@ services:
|
|||||||
sogo-mailcow:
|
sogo-mailcow:
|
||||||
image: mailcow/sogo:1.8
|
image: mailcow/sogo:1.8
|
||||||
build: ./data/Dockerfiles/sogo
|
build: ./data/Dockerfiles/sogo
|
||||||
depends_on:
|
|
||||||
unbound-mailcow:
|
|
||||||
condition: service_healthy
|
|
||||||
environment:
|
environment:
|
||||||
- DBNAME=${DBNAME}
|
- DBNAME=${DBNAME}
|
||||||
- DBUSER=${DBUSER}
|
- DBUSER=${DBUSER}
|
||||||
@ -166,9 +155,6 @@ services:
|
|||||||
dovecot-mailcow:
|
dovecot-mailcow:
|
||||||
image: mailcow/dovecot:1.8
|
image: mailcow/dovecot:1.8
|
||||||
build: ./data/Dockerfiles/dovecot
|
build: ./data/Dockerfiles/dovecot
|
||||||
depends_on:
|
|
||||||
unbound-mailcow:
|
|
||||||
condition: service_healthy
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/conf/dovecot:/usr/local/etc/dovecot
|
- ./data/conf/dovecot:/usr/local/etc/dovecot
|
||||||
- ./data/assets/ssl:/etc/ssl/mail/:ro
|
- ./data/assets/ssl:/etc/ssl/mail/:ro
|
||||||
@ -204,9 +190,6 @@ services:
|
|||||||
postfix-mailcow:
|
postfix-mailcow:
|
||||||
image: mailcow/postfix:1.4
|
image: mailcow/postfix:1.4
|
||||||
build: ./data/Dockerfiles/postfix
|
build: ./data/Dockerfiles/postfix
|
||||||
depends_on:
|
|
||||||
unbound-mailcow:
|
|
||||||
condition: service_healthy
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/conf/postfix:/opt/postfix/conf
|
- ./data/conf/postfix:/opt/postfix/conf
|
||||||
- ./data/assets/ssl:/etc/ssl/mail/:ro
|
- ./data/assets/ssl:/etc/ssl/mail/:ro
|
||||||
@ -232,9 +215,6 @@ services:
|
|||||||
|
|
||||||
memcached-mailcow:
|
memcached-mailcow:
|
||||||
image: memcached:alpine
|
image: memcached:alpine
|
||||||
depends_on:
|
|
||||||
unbound-mailcow:
|
|
||||||
condition: service_healthy
|
|
||||||
restart: always
|
restart: always
|
||||||
dns:
|
dns:
|
||||||
- 172.22.1.254
|
- 172.22.1.254
|
||||||
@ -249,15 +229,11 @@ services:
|
|||||||
- sogo-mailcow
|
- sogo-mailcow
|
||||||
- php-fpm-mailcow
|
- php-fpm-mailcow
|
||||||
image: nginx:mainline-alpine
|
image: nginx:mainline-alpine
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "ping", "php-fpm-mailcow", "-c", "5"]
|
|
||||||
interval: 5s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 10
|
|
||||||
command: /bin/sh -c "envsubst < /etc/nginx/conf.d/templates/listen_plain.template > /etc/nginx/conf.d/listen_plain.active &&
|
command: /bin/sh -c "envsubst < /etc/nginx/conf.d/templates/listen_plain.template > /etc/nginx/conf.d/listen_plain.active &&
|
||||||
envsubst < /etc/nginx/conf.d/templates/listen_ssl.template > /etc/nginx/conf.d/listen_ssl.active &&
|
envsubst < /etc/nginx/conf.d/templates/listen_ssl.template > /etc/nginx/conf.d/listen_ssl.active &&
|
||||||
envsubst < /etc/nginx/conf.d/templates/server_name.template > /etc/nginx/conf.d/server_name.active &&
|
envsubst < /etc/nginx/conf.d/templates/server_name.template > /etc/nginx/conf.d/server_name.active &&
|
||||||
nginx -g 'daemon off;'"
|
until ping phpfpm -c1 > /dev/null; do sleep 1; done &&
|
||||||
|
exec nginx -g 'daemon off;'"
|
||||||
environment:
|
environment:
|
||||||
- HTTPS_PORT=${HTTPS_PORT:-443}
|
- HTTPS_PORT=${HTTPS_PORT:-443}
|
||||||
- HTTP_PORT=${HTTP_PORT:-80}
|
- HTTP_PORT=${HTTP_PORT:-80}
|
||||||
@ -283,8 +259,9 @@ services:
|
|||||||
acme-mailcow:
|
acme-mailcow:
|
||||||
depends_on:
|
depends_on:
|
||||||
- nginx-mailcow
|
- nginx-mailcow
|
||||||
image: mailcow/acme:1.16
|
image: mailcow/acme:1.17
|
||||||
build: ./data/Dockerfiles/acme
|
build: ./data/Dockerfiles/acme
|
||||||
|
init: true
|
||||||
dns:
|
dns:
|
||||||
- 172.22.1.254
|
- 172.22.1.254
|
||||||
dns_search: mailcow-network
|
dns_search: mailcow-network
|
||||||
@ -319,6 +296,7 @@ services:
|
|||||||
- redis-mailcow
|
- redis-mailcow
|
||||||
restart: always
|
restart: always
|
||||||
privileged: true
|
privileged: true
|
||||||
|
init: true
|
||||||
environment:
|
environment:
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
- SKIP_FAIL2BAN=${SKIP_FAIL2BAN:-no}
|
- SKIP_FAIL2BAN=${SKIP_FAIL2BAN:-no}
|
||||||
|
@ -16,7 +16,12 @@ if [ -z "$MAILCOW_HOSTNAME" ]; then
|
|||||||
read -p "Hostname (FQDN): " -ei "mx.example.org" MAILCOW_HOSTNAME
|
read -p "Hostname (FQDN): " -ei "mx.example.org" MAILCOW_HOSTNAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -a /etc/timezone ]] && TZ=$(cat /etc/timezone)
|
if [[ -a /etc/timezone ]]; then
|
||||||
|
TZ=$(cat /etc/timezone)
|
||||||
|
elif [[ -a /etc/localtime ]]; then
|
||||||
|
TZ=$(readlink /etc/localtime|sed -n 's|^.*zoneinfo/||p')
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$TZ" ]; then
|
if [ -z "$TZ" ]; then
|
||||||
read -p "Timezone: " -ei "Europe/Berlin" TZ
|
read -p "Timezone: " -ei "Europe/Berlin" TZ
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user