commit 37cf719982f1f4fb377ad956cde45f38df26fde7
parent 80b90be258c618f99c21bb32694f9bf41ff3dda9
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 18 Nov 2026 13:38:48 +0100
allow subject override via environment variables
Diffstat:
3 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/manpages/challenger-send-email.1.rst b/manpages/challenger-send-email.1.rst
@@ -49,9 +49,17 @@ configure one.
Environment
===========
-**challenger-send-email** reads no environment variables of its own. The
-behaviour of mail(1) and of the local mail transfer agent may be affected by the
-environment of the invoking daemon.
+**EMAIL_SUBJECT**
+ Subject of the mail. Optional; if it is unset or empty, the subject is
+ ``KYC Challenger``. A subject that is not ASCII is encoded as RFC 2047
+ encoded words in UTF-8. The helper fails with status 40 if the subject
+ contains a control character, as a line break would end the ``Subject``
+ header. The subject is not part of the command line, so other users of the
+ host cannot see it in the process table; a service that composes a subject
+ for each message sets it in the environment of each invocation.
+
+The behaviour of mail(1) and of the local mail transfer agent may also be
+affected by the environment of the invoking daemon.
Exit Status
@@ -76,7 +84,8 @@ delivery.
The local mail transfer agent failed or was unavailable.
**40**
- Invocation error, or mail(1) is not installed.
+ Invocation error, mail(1) is not installed, or **EMAIL_SUBJECT** contains a
+ control character.
**50**
The transmission failed for a reason that could not be classified.
diff --git a/manpages/challenger-send-post.1.rst b/manpages/challenger-send-post.1.rst
@@ -88,6 +88,12 @@ Environment
The helper fails with status 40 if any is unset or empty. Credentials are taken
from the environment of the invoking daemon, never from a configuration file.
+**POSTAL_SUBJECT**
+ Subject line of the letter. Optional; if it is unset or empty, the subject
+ is ``Address validation``. Runs of whitespace, line breaks included, are
+ printed as one space. A subject may wrap onto a second line; one that needs
+ a third fails the letter with status 50.
+
typst(1) must be installed and must support the ``--no-pdf-tags`` option.
@@ -126,7 +132,8 @@ delivery.
**50**
The transmission failed for a reason that could not be classified, including
- a message too long to be rendered on a single page.
+ a message too long to be rendered on a single page and a **POSTAL_SUBJECT**
+ too long for two lines.
See Also
diff --git a/taler-challenger-manual.rst b/taler-challenger-manual.rst
@@ -262,6 +262,14 @@ configuration file, so they are configured by setting those variables for the
*SMS transmission providers* below. In any case, these scripts should be
primarily seen as *examples* on how to write authentication commands.
+Two variables that are not credentials set what the e-mail and postal scripts
+call their message, and both are optional: ``EMAIL_SUBJECT`` is the subject of
+the mail that ``challenger-send-email`` sends (``KYC Challenger`` by default),
+and ``POSTAL_SUBJECT`` the subject line of the letter that
+``challenger-send-post`` posts (``Address validation`` by default). See
+:doc:`manpages/challenger-send-email.1` and
+:doc:`manpages/challenger-send-post.1`.
+
.. note::
We strongly welcome contributions for additional scripts with alternative