Skip to content

Commit

Permalink
update mail config #248
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-flo committed Mar 3, 2025
1 parent a5d3ea2 commit 5152c3f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion server/application-server/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:
restart: unless-stopped
volumes:
- ./postfix-config:/config # See https://github.com/ls1admin/postfix-container-tum-mailrelay/tree/main for details
hostname: hephaestus.aet.cit.tum.de
hostname: ${APP_HOSTNAME:localhost}
networks:
- app-network

Expand Down
18 changes: 18 additions & 0 deletions server/application-server/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ spring:
jwt:
issuer-uri: ${KEYCLOAK_URL}/realms/${KEYCLOAK_REALM}

mail:
host: ${POSTFIX_HOST:localhost}
port: ${POSTFIX_PORT:25}
username: ${POSTFIX_USERNAME:}
password: ${POSTFIX_PASSWORD:}
properties:
mail:
transport:
protocol: smtp
smtp:
starttls:
enable: true

hephaestus:
host-url: ${APPLICATION_HOST_URL}

Expand All @@ -30,6 +43,11 @@ hephaestus:
intelligence-service:
url: ${INTELLIGENCE_SERVICE_URL}

mail:
enabled: ${MAIL_ENABLED:false}
sender: ${MAIL_SENDER:}
signature: ${MAIL_SIGNATURE:}

keycloak:
url: ${KEYCLOAK_URL}
realm: ${KEYCLOAK_REALM}
Expand Down
13 changes: 7 additions & 6 deletions server/application-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@ spring:
suffix: .html

mail:
host: ${POSTFIX_HOST:localhost}
port: ${POSTFIX_PORT:25}
username: ${POSTFIX_USERNAME:}
password: ${POSTFIX_PASSWORD:}
host: smtp.gmail.com
port: 587
username: ${POSTFIX_USERNAME:} # gmail email address e.g [email protected]
password: ${POSTFIX_PASSWORD:} # app code password from gmail. how to: https://support.google.com/mail/answer/185833?hl=en
properties:
mail:
transport:
protocol: smtp
smtp:
starttls:
enable: true
debug: true

springdoc:
default-produces-media-type: application/json
Expand Down Expand Up @@ -73,8 +74,8 @@ hephaestus:
# Eviction rate in milliseconds (1 hour)
evict-rate: 3600000
mail:
enabled: ${MAIL_ENABLED:true}
sender: ${MAIL_SENDER:[email protected]}
enabled: false
sender: ${MAIL_SENDER:}
signature: ${MAIL_SIGNATURE:}

keycloak:
Expand Down

0 comments on commit 5152c3f

Please sign in to comment.