Working autoconfig setup with SMTP relay

This commit is contained in:
Lieuwe Leene 2022-11-20 13:53:21 +01:00
parent 9c56e5359c
commit 3f24bbeca4
4 changed files with 32 additions and 7 deletions

View File

@ -2,8 +2,11 @@
NGINX_HOST=""
# GOOGLE DNS API TOKEN
DNS_USERNAME=""
DNS_PASSWORD=""
GDNS_USERNAME=""
GDNS_PASSWORD=""
# COMMON DB PASSWORD
SQL_PSWD=""
# SENDGRID Relay API Key
SENDGRID_APIKEY=""

View File

@ -1,3 +1,13 @@
## Start of configuration add by letsencrypt container
location ^~ /.well-known/acme-challenge/ {
auth_basic off;
auth_request off;
allow all;
root /usr/share/nginx/html;
try_files $uri =404;
break;
}
## End of configuration add by letsencrypt container
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;

View File

@ -3,8 +3,8 @@ version: "3.8"
networks:
internalnet:
# driver: bridge
# enable_ipv6: false
driver: bridge
enable_ipv6: false
x-mail: &defaults
@ -15,6 +15,8 @@ x-mail: &defaults
services:
hugo-html:
networks:
- internalnet
container_name: hugo-html
build:
context: ./config/hugo
@ -132,6 +134,7 @@ services:
domainname: ${NGINX_HOST}
environment:
- POSTMASTER_ADDRESS=admin@${NGINX_HOST}
- RELAY_PASSWORD=${SENDGRID_APIKEY}
ports:
- "25:25"
- "143:143"
@ -189,15 +192,17 @@ services:
image: "ghcr.io/dominickbrasileiro/ddnsgd"
environment:
- HOSTNAME=${NGINX_HOST}
- USERNAME=${DNS_USERNAME}
- PASSWORD=${DNS_PASSWORD}
- USERNAME=${GDNS_USERNAME}
- PASSWORD=${GDNS_PASSWORD}
autodiscover:
<<: *defaults
image: monogramm/autodiscover-email-settings:latest
container_name: autodiscover
environment:
- VIRTUAL_HOST=autodiscover.${NGINX_HOST},autoconfig.${NGINX_HOST}
- VIRTUAL_PORT=8000
- LETSENCRYPT_HOST=autodiscover.${NGINX_HOST},autoconfig.${NGINX_HOST}
- DOMAIN=${NGINX_HOST}
- IMAP_HOST=mail.${NGINX_HOST}
- IMAP_PORT=993

View File

@ -19,7 +19,14 @@ ENABLE_UPDATE_CHECK=1
SSL_TYPE=letsencrypt
SPOOF_PROTECTION=1
ENABLE_POP3=1
ENABLE_DNSBL=1
POSTSCREEN_ACTION=ignore
ENABLE_DNSBL=0
ENABLE_QUOTAS=0
RELAY_HOST=smtp.sendgrid.net
RELAY_PORT=587
RELAY_USER=apikey
## SQL Server Env
POSTGRES_USER="pgadmin"