Skip to content

Support templating mail #1027

@bwbroersma

Description

@bwbroersma

Feature Overview

Support templating for mail block, similar to stream:

Alternatives Considered

I first considered adding 40-add-mail-include.sh:

#!/bin/sh

set -eu

LC_ALL=C
ME=$(basename "$0")
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

touch /etc/nginx/nginx.conf 2>/dev/null || { echo >&2 "$ME: error: can not modify /etc/nginx/nginx.conf (read-only file system?)"; exit 0; }

sed -i -r -z 's@(\}\n)$@\1# Added by '"$ME"' on '"$(date)"'\nmail {\n    include conf.d/*.mail-conf;\n}\n@' /etc/nginx/nginx.conf

but in the review it was noted upstream support, similar to stream, would be a better solution.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions