nginx / nginx/docker-nginx

Support templating mail

Open
#1,027 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Shell
Stars
3.5k
Forks
1.8k
Avg merge
42m
Merged PRs (30d)
2

Description

Feature Overview

Support templating for mail block, similar to stream:

  • #782
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing Docker image support for templating the stream block and compare its entry points with the mail block described here. Review the linked 40-add-mail-include.sh workaround and the referenced stream issue; done means mail templating is supported upstream without that workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, nginx, shell
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.