ansible-role-docker_roundcube/templates/custom_config.php

86 lines
3.5 KiB
PHP

<?php
// {{ ansible_managed }}
// Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %t = domain.tld
$config['username_domain'] = '{{ docker_roundcube_username_domain }}';
// Force domain configured in username_domain to be used for login.
// Any domain in username will be replaced by username_domain.
$config['username_domain_forced'] = false;
{% if docker_roundcube_oauth_provider_name is defined %}
// ----------------------------------
// OAuth
// ----------------------------------
// Enable OAuth2 by defining a provider. Use 'generic' here
$config['oauth_provider'] = 'generic';
// Provider name to be displayed on the login button
$config['oauth_provider_name'] = '{{ docker_roundcube_oauth_provider_name }}';
// Mandatory: OAuth client ID for your Roundcube installation
$config['oauth_client_id'] = '{{ docker_roundcube_oauth_client_id }}';
// Mandatory: OAuth client secret
$config['oauth_client_secret'] = '{{ docker_roundcube_oauth_client_secret }}';
// Mandatory: URI for OAuth user authentication (redirect)
$config['oauth_auth_uri'] = '{{ docker_roundcube_oauth_auth_uri }}';
// Mandatory: Endpoint for OAuth authentication requests (server-to-server)
$config['oauth_token_uri'] = '{{ docker_roundcube_oauth_token_uri }}';
// Optional: Endpoint to query user identity if not provided in auth response
$config['oauth_identity_uri'] = '{{ docker_roundcube_oauth_identity_uri }}';
// Optional: disable SSL certificate check on HTTP requests to OAuth server
// See http://docs.guzzlephp.org/en/stable/request-options.html#verify for possible values
$config['oauth_verify_peer'] = true;
// Mandatory: OAuth scopes to request (space-separated string)
$config['oauth_scope'] = '{{ docker_roundcube_oauth_scope }}';
// Optional: additional query parameters to send with login request (hash array)
$config['oauth_auth_parameters'] = [];
// Optional: array of field names used to resolve the username within the identity information
$config['oauth_identity_fields'] = {{ docker_roundcube_oauth_identity_fields_array }};
// Boolean: automatically redirect to OAuth login when opening Roundcube without a valid session
$config['oauth_login_redirect'] = {{ docker_roundcube_oauth_login_redirect }};
$config['login_password_maxlen'] = 4096;
{% endif %}
// managesieve server port. When empty the port will be determined automatically
// using getservbyname() function, with 4190 as a fallback.
$config['managesieve_port'] = 4190;
// managesieve server address, default is localhost.
// Replacement variables supported in host name:
// %h - user's IMAP hostname
// %n - http hostname ($_SERVER['SERVER_NAME'])
// %d - domain (http hostname without the first part)
// For example %n = mail.domain.tld, %d = domain.tld
$config['managesieve_host'] = 'tls://{{ docker_roundcube_mail_server }}';
// necessite d'avoir fait
// docker exec -ti roundcubelibreticfr_roundcubemail_1 bash
// root@27748d1b9dbd:/var/www/html# composer require roundcube/carddav
//$config['plugins'] = array_filter(array_unique(array_merge($config['plugins'], ['carddav'])));