22.6. challenger-send-email(1)#

22.6.1. Name#

challenger-send-email - transmit a Challenger TAN by electronic mail

22.6.2. Synopsis#

challenger-send-email ADDRESS

22.6.3. Description#

challenger-send-email transmits a TAN to an e-mail address by handing the message to the local mail transfer agent via mail(1).

The command is not normally invoked by hand. It is named in the AUTH_COMMAND option of a [challenger] configuration section (see challenger.conf(5)), and is executed by challenger-httpd(1) whenever a TAN must be delivered. The same invocation contract is used by the Anastasis authorization plugins and by the GNU Taler merchant backend, so the helper may be executed by any of those services.

ADDRESS is the user-supplied address object, as compact JSON. The field consulted is CONTACT_EMAIL, and its name derives from the enter-$ADDRESS_TYPE-form template on the Challenger side.

The message to transmit — including the TAN — is read from standard input. It is the MESSAGE_TEMPLATE_FILE of challenger-httpd(1) after expansion. The TAN is never passed on the command line.

Handing a message to a mail transfer agent establishes only that the agent accepted it for delivery. Whether it reaches the recipient’s mailbox is decided later and asynchronously, and is never reported back. This helper therefore never reports confirmed delivery: a successful run exits with status 1, meaning accepted for delivery.

Delivery requires a working local mail transfer agent. The helper does not configure one.

22.6.4. 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.

22.6.5. Exit Status#

An exit status below 10 means the TAN was transmitted, or will be. Any other status means it was not.

1

The mail transfer agent accepted the message for delivery. This is the success case; status 0 is never reported, as delivery to a mailbox cannot be confirmed.

10

The address is malformed, or the CONTACT_EMAIL field is missing from the address object.

30

The local mail transfer agent failed or was unavailable.

40

Invocation error, or mail(1) is not installed.

50

The transmission failed for a reason that could not be classified.

22.6.6. See Also#

challenger-send-sms(1), challenger-send-post(1), challenger-httpd(1), challenger.conf(5), mail(1).

22.6.7. Bugs#

Report bugs by using https://bugs.taler.net or by sending electronic mail to <taler@gnu.org>.