# {{ ansible_managed }}

# -----------------------------------------------
# - Configuration for postfixadmin install script
# -----------------------------------------------

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

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

# - IPv6 Address
# -
{% if ipv6_address is defined and ipv6_address|length %}
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>'
# -
#WEBMASTER_EMAIL=""

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

# - 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=""


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

# - 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>
# -
#AUTOREPLY_HOSTNAME=""



# - 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
# -
{% if mysql_credentials is defined and mysql_credentials %}
MYSQL_CREDENTIALS='{{ mysql_credentials }}'
{% else %}
#MYSQL_CREDENTIALS=''
{% endif %}


# - The wa passwords will be encrypted.
# -
# -    $CONF['encrypt']
# -
# - Possible values:
# -   md5crypt = internal postfix admin md5
# -   md5 = md5 sum of the password
# -   cleartext = clear text passwords
# -   mysql_encrypt = useful for PAM integration
# -   
# -   authlib = support for courier-authlib style passwords - also set $CONF['authlib_default_flavor']
# -   dovecot:CRYPT-METHOD = use dovecotpw -s 'CRYPT-METHOD'. Example: dovecot:CRAM-MD5
# -      IMPORTANT:
# -         - don't use dovecot:* methods that include the username in the hash - you won't be able 
# -           to login to PostfixAdmin in this case
# -         - you'll need at least dovecot 2.1 for salted passwords ('doveadm pw' 2.0.x doesn't support the '-t' option)
# -         - dovecot 2.0.0 - 2.0.7 is not supported
# -
# - Example:
# -
# -    ENCRYPTION_METHOD="cleartext"
# -    ENCRYPTION_METHOD="dovecot:CRAM-MD5"
# -
ENCRYPTION_METHOD="dovecot:SHA512-CRYPT"

# - If you use the dovecot encryption method: where is the dovecotpw binary located?
# -
# - Defaults to '/usr/local/dovecot/bin/doveadm pw'
# -
#DOVEADM_PW=""

# - Directory where deleted mailbox will be saved
# -
# - defaults to '/var/deleted-maildirs'
# -
#DELETED_MAILBOX_DIR=

# - Directory where deleted domains will be saved
# -
# - defaults to '/var/deleted-maildomains'
# -
#DELETED_DOMAINS_DIR=

# - Welcome Message
# - This message is send to every newly created mailbox.
# -
WELCOME_MESSAGE="
{{ email_welcome_message }}
"


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

# - Type of Postfix database
# -
# - Possible values are 'pgsql' (PostgeSQL) or 'mysql' (MySQL)
# -
{% if "PostgreSQL" == postfix_db_type %}
POSTFIX_DB_TYPE="pgsql"
{% else %}
POSTFIX_DB_TYPE="mysql"
{% endif %}

# - Host/Socket of Postfix Database (MySQL)
# -
# - Example:
# -    POSTFIX_DB_HOST_MYSQL="127.0.0.1"
# -    POSTFIX_DB_HOST_MYSQL="unix:/tmp/mysql.sock"
# -
# - Note:
# - Dont't use 'localhost' if your MySQL socket is NOT
# - located at '/run/mysqld/mysqld.sock'
# - 
# - Defaults to:
# -      'unix:/tmp/mysql.sock'if this socket exists at intsall time 
# -      'unix:/run/mysqld/mysqld.sock' othwerwise
# -
{% if (postfix_db_host is defined) and postfix_db_host and "MySQL" == postfix_db_type %}
POSTFIX_DB_HOST_MYSQL="{{ postfix_db_host }}"
{% else %}
#POSTFIX_DB_HOST_MYSQL=""
{% endif %}

# - Host/Socket of Postfix Database (PostgeSQL)
# -
# - Example:
# -    POSTFIX_DB_HOST_PGSQL='/var/run/postgresql'
# -
# - Defaults to '/run/postgresql'
# -
{% if (postfix_db_host is defined) and postfix_db_host and "PostgreSQL" == postfix_db_type %}
POSTFIX_DB_HOST_PGSQL="{{ postfix_db_host }}"
{% else %}
#POSTFIX_DB_HOST_PGSQL=""
{% endif %}

# - Name of Postfix Database
# -
# - Defaults to 'postfix'
# -
#POSTFIX_DB_NAME=

# - User of Postfix Database
# -
# -    used for setting  $config['password_db_dsn']
# - 
# - Defaults to 'postfix'
# -
#POSTFIX_DB_USER=""

# - Password of Postfix Database
# -
{% if postfix_db_pass is defined and  postfix_db_pass%}
POSTFIX_DB_PASS='{{ postfix_db_pass }}'
{% else %}
#POSTFIX_DB_PASS=''
{% endif %}


# ==========
# - vacation
# ==========

# - Vacation User
# -
# - Defaults to 'vacation'
# -
#VACATION_USER=""

# - Vacation Group
# -
# - Defaults to ''
# -
#VACATION_GROUP="vacation"

