Skip to content

Commit

Permalink
Configurable recipient delimiter (jeboehm#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeboehm authored Apr 1, 2021
1 parent d676239 commit 6d79b19
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ ENABLE_IMAP=true
ENABLE_POP3=true
CONTROLLER_PASSWORD=changeme
WAITSTART_TIMEOUT=2m
RECIPIENT_DELIMITER=-
3 changes: 2 additions & 1 deletion mda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ ENV MYSQL_HOST=db \
ENABLE_IMAP=true \
SSL_CERT=/media/tls/mailserver.crt \
SSL_KEY=/media/tls/mailserver.key \
WAITSTART_TIMEOUT=1m
WAITSTART_TIMEOUT=1m \
RECIPIENT_DELIMITER=-

RUN apk --no-cache add \
curl \
Expand Down
2 changes: 1 addition & 1 deletion mda/rootfs/etc/dovecot/conf.d/15-lda.conf.templ
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ postmaster_address = {{ .Env.POSTMASTER }}
hostname = {{ .Env.MAILNAME }}
submission_host = {{ .Env.SUBMISSION_HOST }}
lda_mailbox_autosubscribe = yes
recipient_delimiter = -
recipient_delimiter = {{ .Env.RECIPIENT_DELIMITER }}
5 changes: 3 additions & 2 deletions mta/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ ENV MAILNAME=mail.example.com \
RELAYHOST=false \
SSL_CERT=/media/tls/mailserver.crt \
SSL_KEY=/media/tls/mailserver.key \
WAITSTART_TIMEOUT=1m
WAITSTART_TIMEOUT=1m \
RECIPIENT_DELIMITER=-

RUN apk --no-cache add \
postfix-mysql \
Expand All @@ -47,7 +48,7 @@ RUN apk --no-cache add \
postconf soft_bounce=no && \
postconf message_size_limit=52428800 && \
postconf mailbox_size_limit=0 && \
postconf recipient_delimiter=- && \
postconf recipient_delimiter="$RECIPIENT_DELIMITER" && \
postconf mynetworks="$MYNETWORKS" && \
postconf maximal_queue_lifetime=1h && \
postconf bounce_queue_lifetime=1h && \
Expand Down
1 change: 1 addition & 0 deletions mta/rootfs/usr/local/bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

postconf myhostname="${MAILNAME}"
postconf mynetworks="${MYNETWORKS}"
postconf recipient_delimiter="${RECIPIENT_DELIMITER}"

if [ "${FILTER_MIME}" == "true" ]
then
Expand Down

0 comments on commit 6d79b19

Please sign in to comment.