Skip to content

Commit

Permalink
fix: smtp config
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinebigard committed Sep 8, 2023
1 parent d403201 commit 47189eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .infra/docker-compose.recette.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.8"

services:
smtp:
image: axllent/mailpit:v1.5.5
image: axllent/mailpit:latest
deploy:
resources:
limits:
Expand All @@ -13,6 +13,7 @@ services:
parallelism: 0
ports:
- 1025:1025
- 8025:8025
networks:
- mna_network
volumes:
Expand Down
18 changes: 7 additions & 11 deletions .infra/files/configs/reverse_proxy/locations/70_smtp.conf.template
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
location /smtp/ {
set $upstream http://smtp:8025/;
proxy_pass $upstream;

# Websocket configuration
# See:
# - https://www.nginx.com/blog/websocket-nginx/
# - https://github.com/mailhog/MailHog/issues/117
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
location ~ ^/smtp/(.*)$ {
set $upstream http://smtp:8025;
proxy_pass $upstream/$1$is_args$args;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
}

0 comments on commit 47189eb

Please sign in to comment.