diff --git a/roles/docker-baserow/templates/env.j2 b/roles/docker-baserow/templates/env.j2 index 183facc4..2a3234f1 100644 --- a/roles/docker-baserow/templates/env.j2 +++ b/roles/docker-baserow/templates/env.j2 @@ -5,7 +5,7 @@ BASEROW_PUBLIC_URL=https://{{ domain }} EMAIL_SMTP={{ system_email_smtp | upper }} EMAIL_SMTP_HOST={{ system_email_host }} EMAIL_SMTP_PORT={{ system_email_smtp_port }} -EMAIL_SMTP_USER={{ system_email_address }} +EMAIL_SMTP_USER={{system_email_username}} EMAIL_SMTP_PASSWORD={{ system_email_password }} EMAIL_SMTP_USE_TLS={{ system_email_tls | upper }} diff --git a/roles/docker-bigbluebutton/templates/env.j2 b/roles/docker-bigbluebutton/templates/env.j2 index f47e56ef..df7a2b3d 100644 --- a/roles/docker-bigbluebutton/templates/env.j2 +++ b/roles/docker-bigbluebutton/templates/env.j2 @@ -187,7 +187,9 @@ LDAP_AUTH= LDAP_PASSWORD= LDAP_ROLE_FIELD= LDAP_FILTER= - +# ==================================== +# GREENLIGHT CONFIGURATION +# ==================================== # Set this to true if you want GreenLight to support user signup and login without # Omniauth. For more information, see: # @@ -195,16 +197,23 @@ LDAP_FILTER= # ALLOW_GREENLIGHT_ACCOUNTS=true +### SMTP CONFIGURATION +# Emails are required for the basic features of Greenlight to function. +# Please refer to your SMTP provider to get the values for the variables below + SMTP_SERVER={{system_email_host}} SMTP_DOMAIN={{domain}} SMTP_PORT={{system_email_smtp_port}} -SMTP_USERNAME={{system_email_address}} +SMTP_USERNAME={{system_email_username}} SMTP_PASSWORD={{system_email_password}} SMTP_AUTH=plain SMTP_OPENSSL_VERIFY_MODE=none -SMTP_STARTTLS_AUTO={{system_email_start_tls}} -SMTP_SENDER={{system_email_address}} -SMTP_SENDER_EMAIL={{system_email_address}} +SMTP_STARTTLS_AUTO={{system_email_start_tls | lower}} +SMTP_STARTTLS={{system_email_start_tls | lower}} +SMTP_TLS={{system_email_tls | lower}} +SMTP_SSL_VERIFY=true +SMTP_SENDER={{system_email_from}} +SMTP_SENDER_EMAIL={{system_email_from}} # Prefix for the applications root URL. # Useful for deploying the application to a subdirectory, which is highly recommended diff --git a/roles/docker-discourse/templates/discourse_application.yml.j2 b/roles/docker-discourse/templates/discourse_application.yml.j2 index b1962e9a..e91ce845 100644 --- a/roles/docker-discourse/templates/discourse_application.yml.j2 +++ b/roles/docker-discourse/templates/discourse_application.yml.j2 @@ -57,11 +57,11 @@ env: # WARNING the char '#' in SMTP password can cause problems! DISCOURSE_SMTP_ADDRESS: {{ system_email_host }} DISCOURSE_SMTP_PORT: {{ system_email_smtp_port }} - DISCOURSE_SMTP_USER_NAME: {{system_email_address}} + DISCOURSE_SMTP_USER_NAME: {{system_email_username}} DISCOURSE_SMTP_PASSWORD: {{ system_email_password }} DISCOURSE_SMTP_ENABLE_START_TLS: {{ system_email_start_tls | upper }} DISCOURSE_SMTP_DOMAIN: {{ system_email_domain }} - DISCOURSE_NOTIFICATION_EMAIL: {{system_email_address}} + DISCOURSE_NOTIFICATION_EMAIL: {{system_email_from}} # Database Configuration DISCOURSE_DB_USERNAME: {{ database_username }} diff --git a/roles/docker-friendica/README.md b/roles/docker-friendica/README.md index dfa99e5b..464245be 100644 --- a/roles/docker-friendica/README.md +++ b/roles/docker-friendica/README.md @@ -38,10 +38,17 @@ docker-compose up -d --force-recreate && sleep 2; docker compose exec --user www ### info ```bash +## Check general config cat /var/lib/docker/volumes/friendica_data/_data/config/local.config.php ## Check environment variables docker compose exec -it application printenv +## Check email configuration +docker compose exec -it application cat /etc/msmtprc ``` + +## email debugging: +echo "Testnachricht" | msmtp --account=system_email -t kevin@veen.world + ## create user INSERT INTO user (guid, username, email, password, verified, register_date, account_expires_on, account_expired) VALUES ( diff --git a/roles/docker-friendica/templates/docker-compose.yml.j2 b/roles/docker-friendica/templates/docker-compose.yml.j2 index fc98c01b..1dd40aa0 100644 --- a/roles/docker-friendica/templates/docker-compose.yml.j2 +++ b/roles/docker-friendica/templates/docker-compose.yml.j2 @@ -37,8 +37,8 @@ services: SMTP_PORT: {{system_email_smtp_port}} SMTP_AUTH_USER: {{system_email_username}} SMTP_AUTH_PASS: {{system_email_password}} - SMTP_STARTTLS: "{{ 'On' if system_email_start_tls else 'Off' }}" - SMTP_FROM: {{system_email_address}} + SMTP_STARTTLS: {{ 'on' if system_email_start_tls else 'off' }} + SMTP_FROM: {{system_email_from}} # Administrator Credentials FRIENDICA_ADMIN_MAIL: {{administrator_email}} diff --git a/roles/docker-mastodon/templates/.env.production.j2 b/roles/docker-mastodon/templates/.env.production.j2 index 07606a99..5a604494 100644 --- a/roles/docker-mastodon/templates/.env.production.j2 +++ b/roles/docker-mastodon/templates/.env.production.j2 @@ -18,12 +18,12 @@ REDIS_PASSWORD= SMTP_SERVER={{system_email_host}} SMTP_PORT={{system_email_smtp_port}} -SMTP_LOGIN={{system_email_address}} +SMTP_LOGIN={{system_email_username}} SMTP_PASSWORD={{system_email_password}} SMTP_AUTH_METHOD=plain SMTP_OPENSSL_VERIFY_MODE=none SMTP_ENABLE_STARTTLS=auto -SMTP_FROM_ADDRESS=Mastodon <{{system_email_address}}> +SMTP_FROM_ADDRESS=Mastodon <{{system_email_from}}> ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY= {{mastodon_active_record_encryption_deterministic_key}} ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT={{mastodon_active_record_encryption_key_derivation_salt}} diff --git a/roles/docker-matrix-compose/templates/synapse/homeserver.yaml.j2 b/roles/docker-matrix-compose/templates/synapse/homeserver.yaml.j2 index 2cfc18b2..2d9a7df2 100644 --- a/roles/docker-matrix-compose/templates/synapse/homeserver.yaml.j2 +++ b/roles/docker-matrix-compose/templates/synapse/homeserver.yaml.j2 @@ -33,12 +33,12 @@ admin_contact: 'mailto:{{administrator_email}}' email: smtp_host: "{{system_email_host}}" smtp_port: "{{system_email_smtp_port}}" - smtp_user: "{{system_email_address}}" + smtp_user: "{{system_email_from}}" smtp_pass: "{{system_email_password}}" #force_tls: true #require_transport_security: true enable_tls: "{{ system_email_tls | upper }}" - notif_from: "Your Friendly %(app)s homeserver <{{system_email_address}}>" + notif_from: "Your Friendly %(app)s homeserver <{{system_email_from}}>" app_name: "Matrix on {{synapse_domain}}" enable_notifs: true notif_for_new_users: false diff --git a/roles/docker-nextcloud/templates/docker-compose.yml.j2 b/roles/docker-nextcloud/templates/docker-compose.yml.j2 index 95ba5c1e..e894ff53 100644 --- a/roles/docker-nextcloud/templates/docker-compose.yml.j2 +++ b/roles/docker-nextcloud/templates/docker-compose.yml.j2 @@ -13,11 +13,27 @@ services: volumes: - data:/var/www/html environment: + # Database Configuration MYSQL_DATABASE: "{{database_name}}" MYSQL_USER: "{{database_username}}" MYSQL_PASSWORD: "{{database_password}}" MYSQL_HOST: {{database_host}}:3306 + + # Memory PHP_MEMORY_LIMIT: 1G # Required for plugin duplicate finder + + # Email Configuration + SMTP_HOST: {{system_email_host}} + SMTP_SECURE: {{ 'ssl' if system_email_start_tls else 'tls' }} + SMTP_PORT: {{system_email_smtp_port}} + SMTP_NAME: {{system_email_username}} + SMTP_PASSWORD: {{system_email_password}} + + # Email from configuration + # MAIL_FROM_ADDRESS: no-reply + # MAIL_DOMAIN: {{domain}} + +At least SMTP_HOST, MAIL_FROM_ADDRESS and MAIL_DOMAIN must be set for the configurations to be applied. {% include 'templates/docker/container/depends-on-database-redis.yml.j2' %} {% include 'templates/docker/container/networks.yml.j2' %} diff --git a/roles/docker-peertube/templates/env.j2 b/roles/docker-peertube/templates/env.j2 index f9b94e74..db526f35 100644 --- a/roles/docker-peertube/templates/env.j2 +++ b/roles/docker-peertube/templates/env.j2 @@ -14,11 +14,11 @@ PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback"] PEERTUBE_SECRET={{peertube_secret}} # E-mail configuration -PEERTUBE_SMTP_USERNAME={{system_email_address}} +PEERTUBE_SMTP_USERNAME={{system_email_username}} PEERTUBE_SMTP_PASSWORD={{system_email_password}} PEERTUBE_SMTP_HOSTNAME={{system_email_host}} PEERTUBE_SMTP_PORT={{system_email_smtp_port}} -PEERTUBE_SMTP_FROM={{system_email_address}} +PEERTUBE_SMTP_FROM={{system_email_from}} PEERTUBE_SMTP_TLS={{ system_email_tls | lower }} PEERTUBE_SMTP_DISABLE_STARTTLS={{ 'false' if system_email_start_tls else 'true' }} -PEERTUBE_ADMIN_EMAIL={{system_email_address}} \ No newline at end of file +PEERTUBE_ADMIN_EMAIL={{system_email_from}} \ No newline at end of file diff --git a/roles/docker-pixelfed/templates/env.j2 b/roles/docker-pixelfed/templates/env.j2 index cd2d2faf..26be4d68 100644 --- a/roles/docker-pixelfed/templates/env.j2 +++ b/roles/docker-pixelfed/templates/env.j2 @@ -48,11 +48,13 @@ RESTRICTED_INSTANCE=false MAIL_DRIVER=log MAIL_HOST={{system_email_host}} MAIL_PORT={{system_email_smtp_port}} -MAIL_FROM_ADDRESS="{{system_email_address}}" +MAIL_FROM_ADDRESS="{{system_email_from}}" MAIL_FROM_NAME="Pixelfed" -MAIL_USERNAME={{system_email_address}} +MAIL_USERNAME={{system_email_username}} MAIL_PASSWORD={{system_email_password}} -MAIL_ENCRYPTION=tls +# Not sure if the following is correct +# Checkout: https://github.com/pixelfed/pixelfed/blob/dev/.env.docker +MAIL_ENCRYPTION={{ 'ssl' if system_email_start_tls else 'tls' }} ## Databases (MySQL) DB_CONNECTION=mysql diff --git a/roles/docker-taiga/templates/.env.j2 b/roles/docker-taiga/templates/.env.j2 index 187be69b..534b88aa 100644 --- a/roles/docker-taiga/templates/.env.j2 +++ b/roles/docker-taiga/templates/.env.j2 @@ -15,9 +15,9 @@ POSTGRES_PASSWORD={{database_password}} # database user's password EMAIL_BACKEND = console # use an SMTP server or display the emails in the console (either "smtp" or "console") EMAIL_HOST = {{system_email_host}} # SMTP server address EMAIL_PORT = {{system_email_smtp_port}} # default SMTP port -EMAIL_HOST_USER = {{system_email_address}} # user to connect the SMTP server +EMAIL_HOST_USER = {{system_email_username}} # user to connect the SMTP server EMAIL_HOST_PASSWORD = {{system_email_password}} # SMTP user's password -EMAIL_DEFAULT_FROM = {{system_email_address}} # default email address for the automated emails +EMAIL_DEFAULT_FROM = {{system_email_from}} # default email address for the automated emails # EMAIL_USE_TLS/EMAIL_USE_SSL are mutually exclusive (only set one of those to True) EMAIL_USE_TLS={{ system_email_tls | lower | capitalize }} # use TLS (secure) connection with the SMTP server EMAIL_USE_SSL={{ 'False' if system_email_start_tls else 'True' }} # use implicit TLS (secure) connection with the SMTP server diff --git a/roles/systemd-notifier-email/templates/msmtprc.conf.j2 b/roles/systemd-notifier-email/templates/msmtprc.conf.j2 index e6fb5aca..e3997fcd 100644 --- a/roles/systemd-notifier-email/templates/msmtprc.conf.j2 +++ b/roles/systemd-notifier-email/templates/msmtprc.conf.j2 @@ -2,6 +2,7 @@ defaults auth on logfile ~/.msmtp.log +tls_starttls {{ 'on' if system_email_start_tls else 'off' }} {% if system_email_tls %} tls on tls_trust_file /etc/ssl/certs/ca-certificates.crt @@ -12,8 +13,8 @@ tls off account system_email host {{system_email_host}} port {{system_email_smtp_port}} -from {{system_email_address}} -user {{system_email_address}} +from {{system_email_from}} +user {{system_email_username}} password {{system_email_password}} account default : system_email diff --git a/roles/systemd-notifier-email/templates/systemd-notifier-email.sh.j2 b/roles/systemd-notifier-email/templates/systemd-notifier-email.sh.j2 index 8d68e552..a4981db5 100644 --- a/roles/systemd-notifier-email/templates/systemd-notifier-email.sh.j2 +++ b/roles/systemd-notifier-email/templates/systemd-notifier-email.sh.j2 @@ -2,7 +2,7 @@ /usr/bin/sendmail -t < +From: systemd <{{system_email_from}}> Subject: $1 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8