# {{ ansible_managed }}

# ----------------------------------------------------
# - Configuration for roundcube install/upgrade script
# ----------------------------------------------------

# - Name of the website - usualy 'webmail.<domain>.<tld>'
# -
{% if (webmaili_2_site_name is defined) and webmaili_2_site_name %}
WEBSITE_NAME="{{ webmaili_2_site_name }}"
{% else %}
#WEBSITE_NAME=
{% endif %}

# - IPv4 Address
# -
{% if ipv4_address is defined and ipv4_address %}
IPV4="{{ ipv4_address }}"
{% else %}
#IPV4=""
{% endif %}

# - IPv6 Address
# -
{% if ipv6_address is defined and ipv6_address %}
IPV6="{{ ipv6_address }}"
{% else %}
#IPV6=""
{% endif %}

# - Is apache installed from debian package system ?
# -
# - Boolean, possible values are 'true', 'false'
# -
# - Defaults to 'false'
# 
#APACHE_DEBIAN_INSTALLATION=""

# - Apache User
# -
# - If ommitted, script tries to determine the user under which user the webserver
# - is running. If that fails, parameter defaults to 'www-data'
# -
#HTTP_USER=""

# - Apache Group
# -
# - If ommitted, script tries to determine the user under which group the webserver
# - is running. If that fails, parameter defaults to 'www-data'
# -
#HTTP_GROUP=""

# - Webmasters E-Mail Address
# -
# - Defaults to 'admin@<domain>.<tld>'
# -
{% if (admin_email is defined) and admin_email %}
WEBMASTER_EMAIL="{{ admin_email }}"
{% else %}
#WEBMASTER_EMAIL=""
{% endif %}

# - Base Directory of Roundcube Website 
# -
# - Note: it's not the 'DocumentRoot' directory, but the directory where
# -       the 'DocumentRoot' Directory lives.
# -
# - Defaults to '/var/www/webmail/$WEBSITE_NAME'
# -
#WEBSITE_BASEDIR=""


# - Directory for storing temporary files
# -
# - Defaults to '${WEBMAIL_BASEDIR}/temp"
# -
#ROUNDCUBE_TMPDIR=""

# - Directory, where apache places the log-files for thw webmailers site.
# -
# - Defaults to '/var/log/apache2'
# -
#APACHE_LOG_DIR=""

# - Directory where certificate and key for the roundcube website
# - are stored.
# -
# - Example:
# -    APACHE_CERT_DIR="/var/lib/dehydrated/certs/$WEBSITE_NAME"
# -
# - Defaults to
# -    '/etc/apache2' if apache is installed from debian package system
# -    '/usr/local/apache2/conf' otherwise
# -
APACHE_CERT_DIR="/var/lib/dehydrated/certs/$WEBSITE_NAME"

# - Certificate for the Rounfcube Website
# -
# - Example:
# -    APACHE_SERVER_CERT="fullchain.pem"
# -
# - Defaults to 'server-bundle.crt'
# -
APACHE_SERVER_CERT="fullchain.pem"

# - Key File for the Rounfcube Website
# -
# - Example:
# -    APACHE_SERVER_KEY="privkey.pem"
# -
# - Defaults to 'server.key'
# -
APACHE_SERVER_KEY="privkey.pem"

# - Certification Chain File
# -
# - Deprecated since Apache 2.4 - Leave empty if not present
# -
#CERT_ChainFile=""

# - Type of PHP installation.
# -
# - Possible values are: 'php_fpm' , 'fcgid' , 'mod_php
# -
# - defaults to 'php_fpm''
# -
#PHP_TYPE=""

# - Directory where apache vhosts definitions live.
# -
# - Defaults to
# -    '/etc/apache2/sites-available' if installed from debain package system
# -    '/usr/local/apache2/conf/vhosts' otherwise
# -
#APACHE_VHOST_DIR=""

# - Hostname for vacation / absence messages
# -
# - Defaults to 'autoreply.<domain>.<tld>
# -
{% if autoreply_2_hostname is defined and autoreply_2_hostname %}
AUTOREPLY_HOSTNAME="{{ autoreply_2_hostname }}"
{% else %}
#AUTOREPLY_HOSTNAME=""
{% endif %}

# - Database type for Roundcube
# -
# - Possible values are 'pgsql' (PostgeSQL) or 'mysql' (MySQL)
# -
{% if roundcube_2_db_type is defined and roundcube_2_db_type %}
DB_TYPE="{{ roundcube_2_db_type }}"
{% else %}
#DB_TYPE=""
{% endif %}

# - Host of Roundcube Database
# -
# - Defaults to 'localhost'
# -
{% if (roundcube_2_db_host is defined) and roundcube_2_db_host %}
DB_HOST="{{ roundcube_2_db_host }}"
{% else %}
#DB_HOST=""
{% endif %}

# - Name of Roundcube Database
# -
# - Defaults to 'roundcubemail'
# -
{% if roundcube_2_db_name is defined and roundcube_2_db_name %}
DB_NAME="{{ roundcube_2_db_name }}"
{% else %}
#DB_NAME=""
{% endif %}

# - User of Roundcube Database
# - 
# - Defaults to 'roundcube'
# -
{% if roundcube_2_db_user is defined and roundcube_2_db_user %}
DB_USER="{{ roundcube_2_db_user }}"
{% else %}
#DB_USER=""
{% endif %}

# - Password of Roundcube Database
# -
{% if roundcube_2_db_pass is defined and roundcube_2_db_pass %}
DB_PASS='{{ roundcube_2_db_pass }}'
{% else %}
#DB_PASS=''
{% endif %}


# - Is MySQL installed from debian package system?
# -
# - Only needed, if DB_TYPE is set to 'mysql'
# -
# - Defaults to 'false'
# -
#MYSQL_DEBIAN_INSTALLATION=""

# - mysql_credential_args (root access to MySQL Database)
# -
# - Example
# -    mysql_credential_args="--login-path=local"
# -    mysql_credential_args="--defaults-file=/etc/mysql/debian.cnf" (Debian default)
# -    mysql_credential_args="--defaults-file=/usr/local/mysql/sys-maint.cnf"
# -
# - Defaults to:
# -    '/etc/mysql/debian.cnf' if MySQL is installed from debian package system
# -    '/usr/local/mysql/sys-maint.cnf' otherwise
# -
#MYSQL_CREDENTIALS=""

# - Name of the folder where (assumed) junk mails will be stored
# -
# - Defaults to 'Spam'
# -
#SPAM_FOLDER_NAME=""

# - You can set your own product name to replace the default.
# -
# - Defaults to 'Roundcube Webmail'
# -
{% if roundcube_2_product_name is defined and roundcube_2_product_name %}
PRODUCT_NAME="{{ roundcube_2_product_name }}"
{% else %}
#PRODUCT_NAME=""
{% endif %}

# - URL for users, to get in contact if something goes wrong
# -
# - Defaults to 'www.<domain>.<tld>'
# -
{% if roundcube_2_support_url is defined and roundcube_2_support_url %}
SUPPORT_URL="{{ roundcube_2_support_url }}"
{% else %}
#SUPPORT_URL=""
{% endif %}

# - Provide your own logo under this URI
# -
# - Note: this script will NOT place the logo. You have to do this by your own
# -       after installation is finisched.
# -
# - Default is empty
# -
{% if roundcube_2_skin_logo is defined and roundcube_2_skin_logo %}
SKIN_LOGO="{{ roundcube_2_skin_logo }}"
{% else %}
#SKIN_LOGO=""
{% endif %}



# --------------------
# - Plugins Configuration
# --------------------


# ==========
# - Settings Postfix Database
# ==========

# - Type of Postfix database
# -
# -    used for setting  $config['password_db_dsn']
# -
# - Possible values are 'pgsql' (PostgeSQL) or 'mysql' (MySQL)
# -
{% if "PostgreSQL" == postfix_db_type %}
POSTFIX_DB_TYPE="pgsql"
{% else %}
POSTFIX_DB_TYPE="mysql"
{% endif %}

# - Host of Postfix Database
# -
# -    used for setting  $config['password_db_dsn']
# -
# - Defaults to 'localhost'
# -
{% if (postfix_db_host is defined) and postfix_db_host %}
POSTFIX_DB_HOST_PGSQL="{{ postfix_db_host }}"
{% else %}
#POSTFIX_DB_HOST_PGSQL=""
{% endif %}

# - Name of Postfix Database
# -
# -    used for setting  $config['password_db_dsn']
# -
# - Defaults to 'postfix'
# -
{% if (postfix_db_name is defined) and postfix_db_name %}
POSTFIX_DB_NAME="{{ postfix_db_name }}"
{% else %}
#POSTFIX_DB_NAME=""
{% endif %}

# - User of Postfix Database
# -
# -    used for setting  $config['password_db_dsn']
# - 
# - Defaults to 'postfix'
# -
{% if (postfix_db_name is defined) and postfix_db_name %}
POSTFIX_DB_USER="{{ postfix_db_user }}"
{% else %}
#POSTFIX_DB_USER=""
{% endif %}

# - Password of Postfix Database
# -
# -    used for setting  $config['password_db_dsn']
# -
{% if (postfix_db_pass is defined) and postfix_db_pass %}
POSTFIX_DB_PASSWD='{{ postfix_db_pass }}'
{% else %}
#POSTFIX_DB_PASSWD=''
{% endif %}


# ===
# - Plugin acl
# ===

# - Activate plugin 'acl'?
# -
# - Boolean - possible values are 'true' and 'false'
# -
# - Defaults to 'false'
# -
{% if roundcube2_acl_plugin is defined and roundcube2_acl_plugin is sameas true %}
INCLUDE_ACL_PLUGIN="true"
{% else %}
#INCLUDE_ACL_PLUGIN="false"
{% endif %}


# ===
# - Plugin password (change password)
# ===

# - Is current password reqired 
# -
# -    $config['password_confirm_current']
# - 
# - Boolean -  possible values are 'true' and 'false'
# -
# - Defaults to 'true'
# -
#PW_CONFIRM_CURRENT=""

# - Minimun length if new password
# -
# -    $config['password_minimum_length']
# -
# - Defaults to '10'
# -
#PW_MIN_LENGTH=""

# - New Password requires nonalpha character
# -
# -    $config['password_require_nonalpha']
# -
# - Boolean -  possible values are 'true' and 'false'
# -
# - Defaults to 'true'
# -
#PW_REQUIRE_NONALPHA=''

# - Default password hashing/crypting algorithm.
# -
# -    $config['password_algorithm']
# -
# - Possible values: des-crypt, ext-des-crypt, md5-crypt, blowfish-crypt,
# -                  sha256-crypt, sha512-crypt, md5, sha, smd5, ssha, samba, 
# -                  ad, dovecot, clear.
# - 
# - Defaults to 'dovecot'
# -
PW_PASSWD_ALGO='dovecot'

# - Password prefix (e.g. {CRYPT}, {SHA}, {CRAM-MD5}) for passwords generated
# - 
# -    $config['password_algorithm_prefix']
# -
# - Defaults to '{CRAM-MD5}'
# -
PW_PASSWD_ALGO_PREFIX='{SHA512-CRYPT}'

# - Path for dovecotpw/doveadm-pw
# -
# -    $config['password_dovecotpw']
# -
# - Defaults to '/usr/local/dovecot/bin/doveadm pw'
# -
#PW_DOVEADM_PW=''

# - Dovecot password scheme.
# -
# -    $config['password_dovecotpw_method']
# -
# - Defaults to 'CRAM-MD5
# -
PW_DOVECOT_PW_METHOD='SHA512-CRYPT'

# - The SQL query used to change the password.
# -
# -    $config['password_query']
# -
PW_DB_UPDATE_STRING='UPDATE mailbox SET password=%P WHERE username=%u'


# ==========
# - Plugin password vacation
# ==========

# -  allow vacation forwarder
# - 
# -    $rcmail_config['vacation_gui_vacationforwarder'] = FALSE;
# -
# - defaults to 'false'
# -
#VAC_GUI_FORWARDER=false
