From 98106c29c982f1fc81a79e51ceb800e8f314f311 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Sat, 1 Aug 2026 12:54:52 +0200 Subject: [PATCH] add SMTP from full name option --- README.md | 1 + rootfs/etc/cont-init.d/02-config.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 32349e0..6adbcd2 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ linux/s390x * `SMTP_PASSWORD`: Set the password for authentication. Authentication must be activated with the `SMTP_AUTH` env var. * `SMTP_DOMAIN`: Argument of the `SMTP EHLO` command (default `localhost`) * `SMTP_FROM`: Set the envelope-from address. Supported substitution patterns can be found [here](https://marlam.de/msmtp/msmtp.html#Commands-specific-to-sendmail-mode). +* `SMTP_FROM_FULL_NAME`: Set the full name to use in the From header when msmtp adds one. * `SMTP_ALLOW_FROM_OVERRIDE`: Allow configured envelope-from address to be overriden by actual SMTP MAIL FROM . Can be [`on` or `off`](https://marlam.de/msmtp/msmtp.html#Commands-specific-to-sendmail-mode) (default `on`) * `SMTP_SET_FROM_HEADER`: When to set a From header. Can be [`auto`, `on` or `off`](https://marlam.de/msmtp/msmtp.html#Commands-specific-to-sendmail-mode) (default `auto`) * `SMTP_SET_DATE_HEADER`: When to set a Date header. Can be [`auto` or `off`](https://marlam.de/msmtp/msmtp.html#Commands-specific-to-sendmail-mode) (default `auto`) diff --git a/rootfs/etc/cont-init.d/02-config.sh b/rootfs/etc/cont-init.d/02-config.sh index c2eeca3..9e30172 100644 --- a/rootfs/etc/cont-init.d/02-config.sh +++ b/rootfs/etc/cont-init.d/02-config.sh @@ -13,6 +13,7 @@ TZ=${TZ:-UTC} #SMTP_PASSWORD=${SMTP_PASSWORD:-bar} #SMTP_DOMAIN=${SMTP_DOMAIN:-example.com} #SMTP_FROM=${SMTP_FROM:-foo@example.com} +#SMTP_FROM_FULL_NAME=${SMTP_FROM_FULL_NAME:-Foo Bar} #SMTP_SET_FROM_HEADER=${SMTP_SET_FROM_HEADER:-auto} #SMTP_SET_DATE_HEADER=${SMTP_SET_DATE_HEADER:-auto} #SMTP_REMOVE_BCC_HEADERS=${SMTP_REMOVE_BCC_HEADERS:-on} @@ -71,6 +72,7 @@ if [ -n "$SMTP_USER" ]; then echo "user $SMTP_USER" >> /etc/ if [ -n "$SMTP_PASSWORD" ]; then echo "password $SMTP_PASSWORD" >> /etc/msmtprc; fi if [ -n "$SMTP_DOMAIN" ]; then echo "domain $SMTP_DOMAIN" >> /etc/msmtprc; fi if [ -n "$SMTP_FROM" ]; then echo "from $SMTP_FROM" >> /etc/msmtprc; fi +if [ -n "$SMTP_FROM_FULL_NAME" ]; then echo "from_full_name $SMTP_FROM_FULL_NAME" >> /etc/msmtprc; fi if [ -n "$SMTP_ALLOW_FROM_OVERRIDE" ]; then echo "allow_from_override $SMTP_ALLOW_FROM_OVERRIDE" >> /etc/msmtprc; fi if [ -n "$SMTP_SET_FROM_HEADER" ]; then echo "set_from_header $SMTP_SET_FROM_HEADER" >> /etc/msmtprc; fi if [ -n "$SMTP_SET_DATE_HEADER" ]; then echo "set_date_header $SMTP_SET_DATE_HEADER" >> /etc/msmtprc; fi