1
0

mailman service is almost working

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2024-05-21 10:38:42 -07:00
parent e2af62042a
commit 53a19053ec
3 changed files with 51 additions and 5 deletions

View File

@ -41,6 +41,8 @@ services:
- 465:465 # postfix smtps
- 587:587 # postfix submission
volumes:
- /home/jketreno/docker/mailman/core/var/data/postfix_lmtp:/opt/mailman/postfix_lmtp:ro # Used for LMTP to ketrenet-mailman-core
- /home/jketreno/docker/mailman/core/var/data/postfix_domains:/opt/mailman/postfix_domains:ro # Used for LMTP to ketrenet-mailman-core
- /home/jketreno/docker/webserver/keys/cron/etc/letsencrypt/live:/etc/letsencrypt/live:ro
- /home/jketreno/docker/webserver/keys/cron/etc/letsencrypt/archive:/etc/letsencrypt/archive:ro
- /home/jketreno/docker/webserver/mail/etc/mailname:/etc/mailname:ro
@ -76,6 +78,8 @@ services:
#- /etc/shadow:/etc/systemshadow:ro
#- /etc/gshadow:/etc/systemgshadow:ro
# etc directories with permissions locked down
networks:
ketrenet-mailman:
ketrenet-roundcube:
image: ketrenet-roundcube
@ -144,6 +148,7 @@ services:
hostname: mailman-core
restart: unless-stopped
volumes:
- /home/jketreno/docker/webserver/data/mailman/core/var/etc/mailman.cfg:/etc/mailman.cfg
- /home/jketreno/docker/webserver/data/mailman/core:/opt/mailman/
stop_grace_period: 30s
links:
@ -154,7 +159,13 @@ services:
- DATABASE_URL=postgresql://mailman:mailmanpass@ketrenet-database/mailmandb
- DATABASE_TYPE=postgres
- DATABASE_CLASS=mailman.database.postgresql.PostgreSQLDatabase
- HYPERKITTY_URL=http://ketrenet-mailman-web:8000/hyperkitty
- HYPERKITTY_API_KEY=s0meap1k3y
- MAILMAN_ADMIN_USER=jketreno
- MAILMAN_ADMIN_EMAIL=james_mailman@ketrenos.com
- SMTP_HOST=ketrenos.com
- SMTP_PORT=587
- MTA=postfix
ports:
- "127.0.0.1:8001:8001" # API
- "127.0.0.1:8024:8024" # LMTP - incoming emails
@ -179,9 +190,19 @@ services:
- DATABASE_TYPE=postgres
- DATABASE_URL=postgresql://mailman:mailmanpass@ketrenet-database/mailmandb
- HYPERKITTY_API_KEY=s0meap1k3y
- HYPERKITTY_URL=http://ketrenet-mailman-web:8000/hyperkitty
- SECRET_KEY=s7p4rs3kr1t
- SERVE_FROM_DOMAIN=ketrenos.com
- UWSGI_STATIC_MAP=/mailman/static=/opt/mailman-web-data/static
- MAILMAN_ADMIN_USER=jketreno
- MAILMAN_ADMIN_EMAIL=james_mailman@ketrenos.com
- EMAIL_HOST=ketrenos.com
- EMAIL_PORT=587
- EMAIL_USE_TLS=True
- EMAIL_USE_SSL=False
- SMTP_HOST=ketrenos.com
- SMTP_PORT=587
- MTA=postfix
ports:
- "127.0.0.1:8000:8000" # HTTP
- "127.0.0.1:8080:8080" # uwsgi
@ -195,6 +216,8 @@ services:
- POSTGRES_DB=mailmandb
- POSTGRES_USER=mailman
- POSTGRES_PASSWORD=mailmanpass
- MAILMAN_ADMIN_USER=jketreno
- MAILMAN_ADMIN_EMAIL=james_mailman@ketrenos.com
image: postgres:12-alpine
volumes:
- /home/jketreno/docker/webserver/data/mailman/database:/var/lib/postgresql/data

View File

@ -86,11 +86,28 @@ smtpd_tls_mandatory_ciphers = high
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
# Support multiple recipient delimers (_ and +)
canonical_maps = regexp:/etc/postfix/canonical
recipient_delimiter = _
# Example /etc/postfix/canonical:
# /^([^@]+)\+(.*)@ketrenos\.com$/ ${1}_${2}@ketrenos.com
# sudo postmap /etc/postfix/canonical
# sudo systemctl restart postfix
# Mailman3 support (via ketrenet-mailman-core)
unknown_local_recipient_reject_code = 550
owner_request_special = no
transport_maps =
hash:/opt/mailman/postfix_lmtp
local_recipient_maps =
hash:/opt/mailman/postfix_lmtp
relay_domains =
hash:/opt/mailman/postfix_domains
myorigin = /etc/mailname
mydestination = ketrenos.com, kiaoramassage.com, sketchitect.com, localhost, email.ketrenos.net, ketrenos.net
relayhost =
mailbox_size_limit = 0
recipient_delimiter = _
inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/

View File

@ -18,15 +18,21 @@ server {
location /mailman/static {
alias /opt/mailman/static;
autoindex off;
}
location /mailman {
# First attempt to serve request as file, then
uwsgi_pass ketrenet-mailman-web:8080;
proxy_pass http://ketrenet-mailman-web:8000;
include uwsgi_params;
uwsgi_read_timeout 300;
uwsgi_param SCRIPT_NAME /mailman;
uwsgi_modifier1 30;
uwsgi_read_timeout 300;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass_header Set-Cookie;
proxy_pass_header P3P;
}
location /keys {