Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: juanluisbaptiste/docker-postfix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.2.0
Choose a base ref
...
head repository: juanluisbaptiste/docker-postfix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.3.0
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jul 9, 2021

  1. feat: Parameterize destination config value

    nick authored and juanluisbaptiste committed Jul 9, 2021
    Copy the full SHA
    222d3fa View commit details
  2. Correct sasl_passwd file creation method

    nick authored and juanluisbaptiste committed Jul 9, 2021
    Copy the full SHA
    f831f93 View commit details
Showing with 6 additions and 1 deletion.
  1. +3 −0 .env.example
  2. +2 −0 README.md
  3. +1 −1 run.sh
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -28,3 +28,6 @@

# Optional: This will rewrite the from address overwriting it with the specified address for all email being relayed.
#OVERWRITE_FROM="Your Name" <email@company.com>

# Optional: This will use allow you to set a custom $mydestination value. Default is localhost.
#DESTINATION=
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -77,6 +77,8 @@ The following env variable(s) are optional.
OVERWRITE_FROM=email@company.com
OVERWRITE_FROM="Your Name" <email@company.com>

* `DESTINATION` This will define a list of domains from which incoming messages will be accepted.

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" \
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ DOMAIN=`echo ${SERVER_HOSTNAME} | awk 'BEGIN{FS=OFS="."}{print $(NF-1),$NF}'`
add_config_value "maillog_file" "/dev/stdout"
add_config_value "myhostname" ${SERVER_HOSTNAME}
add_config_value "mydomain" ${DOMAIN}
add_config_value "mydestination" 'localhost'
add_config_value "mydestination" "${DESTINATION:-localhost}"
add_config_value "myorigin" '$mydomain'
add_config_value "relayhost" "[${SMTP_SERVER}]:${SMTP_PORT}"
add_config_value "smtp_use_tls" "yes"