You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-11-23 22:04:47 +02:00
Revert to the old behaviour when ADMIN=false
This commit is contained in:
@@ -133,10 +133,12 @@ http {
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
include /etc/nginx/proxy.conf;
|
include /etc/nginx/proxy.conf;
|
||||||
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
|
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
|
||||||
auth_request /internal/auth/user;
|
|
||||||
proxy_pass http://$webmail;
|
proxy_pass http://$webmail;
|
||||||
|
{% if ADMIN == 'true' %}
|
||||||
|
auth_request /internal/auth/user;
|
||||||
error_page 403 @webmail_login;
|
error_page 403 @webmail_login;
|
||||||
}
|
}
|
||||||
|
|
||||||
location {{ WEB_WEBMAIL }}/sso.php {
|
location {{ WEB_WEBMAIL }}/sso.php {
|
||||||
{% if WEB_WEBMAIL != '/' %}
|
{% if WEB_WEBMAIL != '/' %}
|
||||||
rewrite ^({{ WEB_WEBMAIL }})$ $1/ permanent;
|
rewrite ^({{ WEB_WEBMAIL }})$ $1/ permanent;
|
||||||
@@ -152,11 +154,13 @@ http {
|
|||||||
proxy_pass http://$webmail;
|
proxy_pass http://$webmail;
|
||||||
error_page 403 @webmail_login;
|
error_page 403 @webmail_login;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @webmail_login {
|
location @webmail_login {
|
||||||
return 302 {{ WEB_ADMIN }}/ui/login?next=ui.webmail;
|
return 302 {{ WEB_ADMIN }}/ui/login?next=ui.webmail;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% else %}
|
||||||
|
}
|
||||||
|
{% endif %}{% endif %}
|
||||||
{% if ADMIN == 'true' %}
|
{% if ADMIN == 'true' %}
|
||||||
location {{ WEB_ADMIN }} {
|
location {{ WEB_ADMIN }} {
|
||||||
return 301 {{ WEB_ADMIN }}/ui;
|
return 301 {{ WEB_ADMIN }}/ui;
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ attachment_size_limit = {{ MAX_FILESIZE }}
|
|||||||
allow_admin_panel = Off
|
allow_admin_panel = Off
|
||||||
|
|
||||||
[labs]
|
[labs]
|
||||||
|
allow_gravatar = Off
|
||||||
|
{% if ADMIN == "true" %}
|
||||||
custom_login_link='sso.php'
|
custom_login_link='sso.php'
|
||||||
custom_logout_link='{{ WEB_ADMIN }}/ui/logout'
|
custom_logout_link='{{ WEB_ADMIN }}/ui/logout'
|
||||||
allow_gravatar = Off
|
{% endif %}
|
||||||
|
|
||||||
[contacts]
|
[contacts]
|
||||||
enable = On
|
enable = On
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ $config['plugins'] = array(
|
|||||||
'markasjunk',
|
'markasjunk',
|
||||||
'managesieve',
|
'managesieve',
|
||||||
'enigma',
|
'enigma',
|
||||||
'carddav',
|
'carddav'
|
||||||
'mailu'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$front = getenv('FRONT_ADDRESS') ? getenv('FRONT_ADDRESS') : 'front';
|
$front = getenv('FRONT_ADDRESS') ? getenv('FRONT_ADDRESS') : 'front';
|
||||||
@@ -37,8 +36,11 @@ $config['managesieve_host'] = $imap;
|
|||||||
$config['managesieve_usetls'] = false;
|
$config['managesieve_usetls'] = false;
|
||||||
|
|
||||||
// Customization settings
|
// Customization settings
|
||||||
$config['support_url'] = getenv('WEB_ADMIN') ? '../..' . getenv('WEB_ADMIN') : '';
|
if (filter_var(getenv('ADMIN'), FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)) {
|
||||||
$config['sso_logout_url'] = getenv('WEB_ADMIN').'/ui/logout';
|
array_push($config['plugins'], 'mailu');
|
||||||
|
$config['support_url'] = getenv('WEB_ADMIN') ? '../..' . getenv('WEB_ADMIN') : '';
|
||||||
|
$config['sso_logout_url'] = getenv('WEB_ADMIN').'/ui/logout';
|
||||||
|
}
|
||||||
$config['product_name'] = 'Mailu Webmail';
|
$config['product_name'] = 'Mailu Webmail';
|
||||||
|
|
||||||
// We access the IMAP and SMTP servers locally with internal names, SSL
|
// We access the IMAP and SMTP servers locally with internal names, SSL
|
||||||
|
|||||||
Reference in New Issue
Block a user