From 6fa7a84bd3ffdd70229b141eeb86b49d874e93ac Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 4 Jan 2020 17:03:42 +0100 Subject: [PATCH] Refs #642 Make email catch-all configurable --- docker-compose.yml | 2 +- docs/configuration-files/env-file.rst | 30 +++++++++++++++++++++++++++ env-example | 19 +++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 52ad83ca..8ac74fed 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -135,7 +135,7 @@ services: ## ## Mail-catching ## - - ENABLE_MAIL=2 + - ENABLE_MAIL=${PHP_MAIL_CATCH_ALL:-2} ## ## Enable 127.0.0.1 Port-forwarding diff --git a/docs/configuration-files/env-file.rst b/docs/configuration-files/env-file.rst index 6bd3759e..29b0d7a3 100644 --- a/docs/configuration-files/env-file.rst +++ b/docs/configuration-files/env-file.rst @@ -1164,6 +1164,36 @@ Example: # Disable Xdebug, Imagick and Swoole PHP_MODULES_DISABLE=xdebug,imagick,swoole +PHP_MAIL_CATCH_ALL +^^^^^^^^^^^^^^^^^^ + +Postfix settings for email catch-all. + +When set to ``0`` postfix will be disabled and not started. + +When set to ``1`` postfix is normally started and made available. However you still need +to configure it to your needs yourself. For that you can use the autostart scripts +and define a couple of ``postconf -e name=value`` commands. + +When set to ``2`` (email catch-all) postfix is started, but no mail will leave the Devilbox. It is automatically +internally routed the the devilbox mail account and you can see each sent mail +in the bundled intranet: https://localhost/mail.php + ++-------------------------+--------------------------------------+---------------------------------------------------+ +| Name | Allowed values | Default value | ++=========================+======================================+===================================================+ +| ``PHP_MAIL_CATCH_ALL`` | ``0``, ``1``, ``2`` | ``2`` | ++-------------------------+--------------------------------------+---------------------------------------------------+ + +Example: + +.. code-block:: bash + :caption: .env + :emphasize-lines: 2 + + # Enable Postfix without email catch-all + PHP_MAIL_CATCH_ALL=1 + Custom variables ^^^^^^^^^^^^^^^^ diff --git a/env-example b/env-example index 96e4cfff..d832d827 100644 --- a/env-example +++ b/env-example @@ -471,6 +471,25 @@ PHP_MODULES_ENABLE= PHP_MODULES_DISABLE=oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole +### +### Postfix settings for email catch-all +### +### When set to '1' postfix is normally started and made available. However you still need +### to configure it to your needs yourself. For that you can use the autostart scripts +### and define a couple of 'postconf -e name=value' commands. +### +### When set to '2' (email catch-all), no mail will leave the Devilbox. It is automatically +### internally routed the the devilbox mail account and you can see each sent mail +### in the bundled intranet: https://localhost/mail.php +### +### Values: +### 0: Disable postfix (do not start it) +### 1: Enable/Start postfix +### 2: Enable/Start postfix and enable email catch-all +### +PHP_MAIL_CATCH_ALL=2 + + ### ### Configure everything else about PHP in ### * cfg/php-ini-X.X/*.ini