Optimized friendica und refactored mail configuration

This commit is contained in:
Kevin Veen-Birkenbach 2025-01-15 22:15:44 +01:00
parent 33307c75af
commit d1bec25781
12 changed files with 34 additions and 28 deletions

View File

@ -5,7 +5,7 @@ BASEROW_PUBLIC_URL=https://{{ domain }}
EMAIL_SMTP={{ system_email_smtp | upper }} EMAIL_SMTP={{ system_email_smtp | upper }}
EMAIL_SMTP_HOST={{ system_email_host }} EMAIL_SMTP_HOST={{ system_email_host }}
EMAIL_SMTP_PORT={{ system_email_smtp_port }} EMAIL_SMTP_PORT={{ system_email_smtp_port }}
EMAIL_SMTP_USER={{ system_email_username }} EMAIL_SMTP_USER={{ system_email_address }}
EMAIL_SMTP_PASSWORD={{ system_email_password }} EMAIL_SMTP_PASSWORD={{ system_email_password }}
EMAIL_SMTP_USE_TLS={{ system_email_tls | upper }} EMAIL_SMTP_USE_TLS={{ system_email_tls | upper }}

View File

@ -198,13 +198,13 @@ ALLOW_GREENLIGHT_ACCOUNTS=true
SMTP_SERVER={{system_email_host}} SMTP_SERVER={{system_email_host}}
SMTP_DOMAIN={{domain}} SMTP_DOMAIN={{domain}}
SMTP_PORT={{system_email_smtp_port}} SMTP_PORT={{system_email_smtp_port}}
SMTP_USERNAME={{system_email_username}} SMTP_USERNAME={{system_email_address}}
SMTP_PASSWORD={{system_email_password}} SMTP_PASSWORD={{system_email_password}}
SMTP_AUTH=plain SMTP_AUTH=plain
SMTP_OPENSSL_VERIFY_MODE=none SMTP_OPENSSL_VERIFY_MODE=none
SMTP_STARTTLS_AUTO={{system_email_start_tls}} SMTP_STARTTLS_AUTO={{system_email_start_tls}}
SMTP_SENDER={{system_email_username}} SMTP_SENDER={{system_email_address}}
SMTP_SENDER_EMAIL={{system_email_username}} SMTP_SENDER_EMAIL={{system_email_address}}
# Prefix for the applications root URL. # Prefix for the applications root URL.
# Useful for deploying the application to a subdirectory, which is highly recommended # Useful for deploying the application to a subdirectory, which is highly recommended

View File

@ -57,11 +57,11 @@ env:
# WARNING the char '#' in SMTP password can cause problems! # WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_ADDRESS: {{ system_email_host }} DISCOURSE_SMTP_ADDRESS: {{ system_email_host }}
DISCOURSE_SMTP_PORT: {{ system_email_smtp_port }} DISCOURSE_SMTP_PORT: {{ system_email_smtp_port }}
DISCOURSE_SMTP_USER_NAME: {{ system_email }} DISCOURSE_SMTP_USER_NAME: {{system_email_address}}
DISCOURSE_SMTP_PASSWORD: {{ system_email_password }} DISCOURSE_SMTP_PASSWORD: {{ system_email_password }}
DISCOURSE_SMTP_ENABLE_START_TLS: {{ system_email_start_tls | upper }} DISCOURSE_SMTP_ENABLE_START_TLS: {{ system_email_start_tls | upper }}
DISCOURSE_SMTP_DOMAIN: {{ system_email_domain }} DISCOURSE_SMTP_DOMAIN: {{ system_email_domain }}
DISCOURSE_NOTIFICATION_EMAIL: {{ system_email }} DISCOURSE_NOTIFICATION_EMAIL: {{system_email_address}}
# Database Configuration # Database Configuration
DISCOURSE_DB_USERNAME: {{ database_username }} DISCOURSE_DB_USERNAME: {{ database_username }}

View File

@ -31,6 +31,7 @@ docker compose exec --user www-data -it application bin/console autoinstall
## reinitialisation ## reinitialisation
### docker ### docker
docker-compose up -d --force-recreate
### full ### full
docker-compose up -d --force-recreate && sleep 2; docker compose exec --user www-data -it application bin/console autoinstall; docker-compose up -d --force-recreate && sleep 2; docker compose exec --user www-data -it application bin/console autoinstall;
@ -59,3 +60,4 @@ VALUES (
## More information ## More information
- https://hub.docker.com/_/friendica - https://hub.docker.com/_/friendica
- https://wiki.friendi.ca/docs/install - https://wiki.friendi.ca/docs/install
- https://github.com/friendica/docker

View File

@ -3,7 +3,7 @@ services:
{% include 'templates/docker/services/' + database_type + '.yml.j2' %} {% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application: application:
image: friendica/server image: friendica
restart: {{docker_restart_policy}} restart: {{docker_restart_policy}}
volumes: volumes:
- data:/var/www/html - data:/var/www/html
@ -21,20 +21,24 @@ services:
# Debugging # Debugging
FRIENDICA_DEBUGGING: false FRIENDICA_DEBUGGING: false
FRIENDICA_LOGLEVEL: 5
FRIENDICA_LOGGER: stream
FRIENDICA_LOGFILE: php://stdout
# Database Configuration # Database Configuration
MYSQL_HOST: {{database_host}}:3306 MYSQL_HOST: {{database_host}}:3306
MYSQL_DATABASE: {{database_name}} MYSQL_DATABASE: {{database_name}}
MYSQL_USER: {{database_username}} MYSQL_USER: {{database_username}}
MYSQL_PASSWORD: {{database_password}} MYSQL_PASSWORD: {{database_password}}
SMTP: {{system_email_host}}
# Email Configuration # Email Configuration
SMTP_DOMAIN: {{ system_email_host }} SMTP: {{system_email_host}}
SMTP_DOMAIN: {{system_email_domain}}
SMTP_PORT: {{system_email_smtp_port}} SMTP_PORT: {{system_email_smtp_port}}
SMTP_AUTH_USER: {{system_email_username}} SMTP_AUTH_USER: {{system_email_username}}
SMTP_AUTH_PASS: {{system_email_password}} SMTP_AUTH_PASS: {{system_email_password}}
SMTP_STARTTLS: {{system_email_start_tls}} SMTP_STARTTLS: "{{ 'On' if system_email_start_tls else 'Off' }}"
SMTP_FROM: {{system_email_username}} SMTP_FROM: {{system_email_address}}
# Administrator Credentials # Administrator Credentials
FRIENDICA_ADMIN_MAIL: {{administrator_email}} FRIENDICA_ADMIN_MAIL: {{administrator_email}}

View File

@ -18,12 +18,12 @@ REDIS_PASSWORD=
SMTP_SERVER={{system_email_host}} SMTP_SERVER={{system_email_host}}
SMTP_PORT={{system_email_smtp_port}} SMTP_PORT={{system_email_smtp_port}}
SMTP_LOGIN={{system_email_username}} SMTP_LOGIN={{system_email_address}}
SMTP_PASSWORD={{system_email_password}} SMTP_PASSWORD={{system_email_password}}
SMTP_AUTH_METHOD=plain SMTP_AUTH_METHOD=plain
SMTP_OPENSSL_VERIFY_MODE=none SMTP_OPENSSL_VERIFY_MODE=none
SMTP_ENABLE_STARTTLS=auto SMTP_ENABLE_STARTTLS=auto
SMTP_FROM_ADDRESS=Mastodon <{{system_email_username}}> SMTP_FROM_ADDRESS=Mastodon <{{system_email_address}}>
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY= {{mastodon_active_record_encryption_deterministic_key}} ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY= {{mastodon_active_record_encryption_deterministic_key}}
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT={{mastodon_active_record_encryption_key_derivation_salt}} ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT={{mastodon_active_record_encryption_key_derivation_salt}}

View File

@ -33,12 +33,12 @@ admin_contact: 'mailto:{{administrator_email}}'
email: email:
smtp_host: "{{system_email_host}}" smtp_host: "{{system_email_host}}"
smtp_port: "{{system_email_smtp_port}}" smtp_port: "{{system_email_smtp_port}}"
smtp_user: "{{system_email_username}}" smtp_user: "{{system_email_address}}"
smtp_pass: "{{system_email_password}}" smtp_pass: "{{system_email_password}}"
#force_tls: true #force_tls: true
#require_transport_security: true #require_transport_security: true
enable_tls: "{{ system_email_tls | upper }}" enable_tls: "{{ system_email_tls | upper }}"
notif_from: "Your Friendly %(app)s homeserver <{{system_email}}>" notif_from: "Your Friendly %(app)s homeserver <{{system_email_address}}>"
app_name: "Matrix on {{synapse_domain}}" app_name: "Matrix on {{synapse_domain}}"
enable_notifs: true enable_notifs: true
notif_for_new_users: false notif_for_new_users: false

View File

@ -14,11 +14,11 @@ PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback"]
PEERTUBE_SECRET={{peertube_secret}} PEERTUBE_SECRET={{peertube_secret}}
# E-mail configuration # E-mail configuration
PEERTUBE_SMTP_USERNAME={{system_email_username}} PEERTUBE_SMTP_USERNAME={{system_email_address}}
PEERTUBE_SMTP_PASSWORD={{system_email_password}} PEERTUBE_SMTP_PASSWORD={{system_email_password}}
PEERTUBE_SMTP_HOSTNAME={{system_email_host}} PEERTUBE_SMTP_HOSTNAME={{system_email_host}}
PEERTUBE_SMTP_PORT={{system_email_smtp_port}} PEERTUBE_SMTP_PORT={{system_email_smtp_port}}
PEERTUBE_SMTP_FROM={{system_email}} PEERTUBE_SMTP_FROM={{system_email_address}}
PEERTUBE_SMTP_TLS={{ system_email_tls | lower }} PEERTUBE_SMTP_TLS={{ system_email_tls | lower }}
PEERTUBE_SMTP_DISABLE_STARTTLS={{ 'false' if system_email_start_tls else 'true' }} PEERTUBE_SMTP_DISABLE_STARTTLS={{ 'false' if system_email_start_tls else 'true' }}
PEERTUBE_ADMIN_EMAIL={{system_email}} PEERTUBE_ADMIN_EMAIL={{system_email_address}}

View File

@ -48,9 +48,9 @@ RESTRICTED_INSTANCE=false
MAIL_DRIVER=log MAIL_DRIVER=log
MAIL_HOST={{system_email_host}} MAIL_HOST={{system_email_host}}
MAIL_PORT={{system_email_smtp_port}} MAIL_PORT={{system_email_smtp_port}}
MAIL_FROM_ADDRESS="{{system_email_username}}" MAIL_FROM_ADDRESS="{{system_email_address}}"
MAIL_FROM_NAME="Pixelfed" MAIL_FROM_NAME="Pixelfed"
MAIL_USERNAME={{system_email_username}} MAIL_USERNAME={{system_email_address}}
MAIL_PASSWORD={{system_email_password}} MAIL_PASSWORD={{system_email_password}}
MAIL_ENCRYPTION=tls MAIL_ENCRYPTION=tls

View File

@ -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_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_HOST = {{system_email_host}} # SMTP server address
EMAIL_PORT = {{system_email_smtp_port}} # default SMTP port EMAIL_PORT = {{system_email_smtp_port}} # default SMTP port
EMAIL_HOST_USER = {{system_email_username}} # user to connect the SMTP server EMAIL_HOST_USER = {{system_email_address}} # user to connect the SMTP server
EMAIL_HOST_PASSWORD = {{system_email_password}} # SMTP user's password EMAIL_HOST_PASSWORD = {{system_email_password}} # SMTP user's password
EMAIL_DEFAULT_FROM = {{system_email}} # default email address for the automated emails EMAIL_DEFAULT_FROM = {{system_email_address}} # 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/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_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 EMAIL_USE_SSL={{ 'False' if system_email_start_tls else 'True' }} # use implicit TLS (secure) connection with the SMTP server

View File

@ -12,8 +12,8 @@ tls off
account system_email account system_email
host {{system_email_host}} host {{system_email_host}}
port {{system_email_smtp_port}} port {{system_email_smtp_port}}
from {{system_email}} from {{system_email_address}}
user {{system_email_username}} user {{system_email_address}}
password {{system_email_password}} password {{system_email_password}}
account default : system_email account default : system_email

View File

@ -2,7 +2,7 @@
/usr/bin/sendmail -t <<ERRMAIL /usr/bin/sendmail -t <<ERRMAIL
To: {{administrator_email}} To: {{administrator_email}}
From: systemd <{{system_email}}> From: systemd <{{system_email_address}}>
Subject: $1 Subject: $1
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8