Skip to content

Commit

Permalink
Add msmtp, closes #171
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Mar 7, 2024
1 parent 0194d2f commit 892eda7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ RUN set -xe; \
make \
mariadb-client \
mariadb-connector-c \
msmtp \
nano \
openssh \
openssh-client \
Expand Down Expand Up @@ -353,11 +354,13 @@ RUN set -xe; \
"${FILES_DIR}/xdebug" \
/home/www-data/.ssh; \
\
touch /etc/msmtprc; \
chmod -R 775 "${FILES_DIR}"; \
chown -R wodby:wodby \
"${PHP_INI_DIR}/conf.d" \
/usr/local/etc/php-fpm.d \
/etc/ssmtp/ssmtp.conf \
/etc/msmtprc \
/home/wodby/.[^.]*; \
\
touch /etc/ssh/sshd_config /etc/gitconfig; \
Expand Down
1 change: 1 addition & 0 deletions 8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ process_templates() {
_gotpl "ssh_config.tmpl" "${ssh_dir}/config"
_gotpl "gitconfig.tmpl" "/etc/gitconfig"
_gotpl "ssmtp.conf.tmpl" "/etc/ssmtp/ssmtp.conf"
_gotpl "msmtprc.tmpl" "/etc/msmtprc"
}

disable_modules() {
Expand Down
11 changes: 11 additions & 0 deletions 8/templates/msmtprc.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
defaults
port {{ getenv "MSMTP_PORT" "25" }}
tls {{ getenv "MSMTP_TLS" "off" }}
{{-if getenv "MSMTP_LOG" }}
logfile {{ getenv "MSMTP_LOGFILE" "/proc/self/fd/2" }}
{{-end }}

account default
auth {{ getenv "MSMTP_AUTH" "off" }}
host {{ getenv "MSMTP_HOST" "opensmtpd" }}
add_missing_date_header {{ getenv "MSMTP_ADD_MISSING_DATE_HEADER" "on" }}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@ The default configuration not recommended for use for production environment:
| `SSMTP_MAILHUB` | `opensmtpd:25` |
| `SSMTP_FROM_LINE_OVERRIDE` | `Yes` |
| `SSMTP_USE_TLS` | `No` |
| `MSMTP_PORT` | `25` |
| `MSMTP_TLS` | `off` |
| `MSMTP_LOG` | |
| `MSMTP_LOGFILE` | `/proc/self/fd/2` |
| `MSMTP_AUTH` | `off` |
| `MSMTP_HOST` | `opensmtpd` |
| `MSMTP_ADD_MISSING_DATE_HEADER` | `on` |

## Build arguments

Expand Down

0 comments on commit 892eda7

Please sign in to comment.