🔧(mta-in) rename config var MESSAGE_SIZE_LIMIT to MAX_INCOMING_EMAIL_SIZE

This aligns with the config for the backend
This commit is contained in:
Sylvain Zimmer
2025-11-21 15:20:03 +01:00
parent b7d3ad6837
commit 2770221a13
6 changed files with 6 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
MDA_API_BASE_URL=http://backend-dev:8000/api/v1.0/
MDA_API_SECRET=my-shared-secret-mda
MDA_API_TIMEOUT=2
MESSAGE_SIZE_LIMIT=30000000
MAX_INCOMING_EMAIL_SIZE=30000000

View File

@@ -6,7 +6,7 @@ SMTP_USERNAME=user
SMTP_PASSWORD=pass
# Optional: Message Size Limit
# MESSAGE_SIZE_LIMIT=10240000
# MAX_INCOMING_EMAIL_SIZE=10240000
# POSTFIX_DEBUG=1

View File

@@ -15,7 +15,7 @@ echo >> /etc/postfix/main.cf
[[ -n "${MYHOSTNAME}" ]] && echo "myhostname = ${MYHOSTNAME}" >> /etc/postfix/main.cf
[[ -n "${MYORIGIN}" ]] && echo "myorigin = ${MYORIGIN}" >> /etc/postfix/main.cf
[[ -n "${MYDOMAIN}" ]] && echo "mydomain = ${MYDOMAIN}" >> /etc/postfix/main.cf
echo "message_size_limit=${MESSAGE_SIZE_LIMIT:-10240000}" >> /etc/postfix/main.cf
echo "message_size_limit=${MAX_INCOMING_EMAIL_SIZE:-10240000}" >> /etc/postfix/main.cf
if [ "${ENABLE_PROXY_PROTOCOL:-false}" = "haproxy" ]; then
echo "postscreen_upstream_proxy_protocol = haproxy" >> /etc/postfix/main.cf

View File

@@ -35,7 +35,7 @@ Configuration is done entirely through environment variables:
- `MYHOSTNAME`: The hostname this MTA identifies itself with in HELO/EHLO commands (default: `localhost`). Setting a proper FQDN is recommended. If it is not set we will attempt auto-detection from the rRNS of the host.
- `TLS_CERT_PATH`: Path to the TLS certificate file (default: `/etc/ssl/certs/ssl-cert-snakeoil.pem`). **WARNING:** Mount a real certificate in production.
- `TLS_KEY_PATH`: Path to the TLS private key file (default: `/etc/ssl/private/ssl-cert-snakeoil.key`). **WARNING:** Mount a real key in production.
- `MESSAGE_SIZE_LIMIT`: Maximum size of messages in bytes (default: `10240000`).
- `MAX_INCOMING_EMAIL_SIZE`: Maximum size of messages in bytes (default: `10240000`).
## Testing

View File

@@ -18,7 +18,7 @@ cp /app/etc/sasl/smtpd.conf /etc/postfix/sasl/smtpd.conf
: "${SMTP_PASSWORD:?Error: SMTP_PASSWORD must be set}"
# Set optional vars with defaults
export MESSAGE_SIZE_LIMIT=${MESSAGE_SIZE_LIMIT:-10240000}
export MAX_INCOMING_EMAIL_SIZE=${MAX_INCOMING_EMAIL_SIZE:-10240000}
export SMTP_RELAY_HOST=${SMTP_RELAY_HOST:-""}
export SMTP_RELAY_USERNAME=${SMTP_RELAY_USERNAME:-""}
export SMTP_RELAY_PASSWORD=${SMTP_RELAY_PASSWORD:-""}

View File

@@ -75,7 +75,7 @@ smtpd_relay_restrictions =
reject
# === Message Size ===
message_size_limit = {{ MESSAGE_SIZE_LIMIT }}
message_size_limit = {{ MAX_INCOMING_EMAIL_SIZE }}
# === Delivery Method (Outgoing Connections) ===
{% if SMTP_RELAY_HOST %}