Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add always_bcc feature #91

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@

# Optional: This will use allow you to set a custom $message_size_limit value. Default is 10240000.
#MESSAGE_SIZE_LIMIT=


# Optional: This will send all message via BCC to this address. Example setting: [email protected]
#ALWAYS_BCC=
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ The following env variable(s) are optional.

* `MESSAGE_SIZE_LIMIT` This will change the default limit of 10240000 bytes (10MB).

* `ALWAYS_BCC` This will send all message via BCC to this address. Example setting:
[email protected]

To use this container from anywhere, the 25 port or the one specified by `SMTP_PORT` needs to be exposed to the docker host server:

docker run -d --name postfix -p "25:25" \
Expand Down
6 changes: 6 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ if [ ! -z "${MESSAGE_SIZE_LIMIT}" ]; then
echo "Setting configuration option message_size_limit with value: ${MESSAGE_SIZE_LIMIT}"
fi

# Set always_bcc
if [ ! -z "${ALWAYS_BCC}" ]; then
postconf -e "always_bcc = ${ALWAYS_BCC}"
echo "Setting configuration option always_bcc with value: ${ALWAYS_BCC}"
fi

#Start services

# If host mounting /var/spool/postfix, we need to delete old pid file before
Expand Down