Skip to content

Commit

Permalink
Authenticate mails sent by MaMpf (#590)
Browse files Browse the repository at this point in the history
* Authenticate mails sent by MaMpf

* Fix mails comment

* Add `nil` env fallback due to #542 (this one was removed again in merge commit 4d066c3)
  • Loading branch information
Splines committed Mar 19, 2024
1 parent 7da7d7e commit 469bb11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
config.action_mailer.smtp_settings = {
address: ENV.fetch("MAILSERVER"),
port: 25,
domain: ENV.fetch("MAILSERVER")
user_name: ENV.fetch("MAMPF_EMAIL_USERNAME"),
password: ENV.fetch("MAMPF_EMAIL_PASSWORD")
}

# Ignore bad email addresses and do not raise email delivery errors.
Expand Down
4 changes: 3 additions & 1 deletion docker/production/docker.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MUESLI_SERVER=https://muesli.mathi.uni-heidelberg.de
ERDBEERE_API=https://erdbeere.mathi.uni-heidelberg.de/api/v1
MEMCACHED_SERVER=cache

# Email is send using a mailserver without authentication. Specify how to connect here
# Email
FROM_ADDRESS=mampf@mathi.uni-heidelberg.de
MAILSERVER=mail.mathi.uni-heidelberg.de
PROJECT_EMAIL=mampf@mathi.uni-heidelberg.de
Expand All @@ -22,6 +22,8 @@ IMAPSERVER=mail.mathi.uni-heidelberg.de
PROJECT_EMAIL_USERNAME=creativeusername
PROJECT_EMAIL_PASSWORD=secretsecret
PROJECT_EMAIL_MAILBOX="Other Users/mampf"
MAMPF_EMAIL_USERNAME=secret
MAMPF_EMAIL_PASSWORD=secret

# Due to CORS constraints, some urls are proxied to the media server
DOWNLOAD_LOCATION=https://mampf.mathi.uni-heidelberg.de/mediaforward
Expand Down

0 comments on commit 469bb11

Please sign in to comment.