Skip to content

Commit 55601ee

Browse files
committed
Add documentation for DMA
1 parent f7abdb6 commit 55601ee

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

README.md

+28
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,34 @@ ENV APACHE_RUN_USER=www-data \
404404
```
405405

406406

407+
## Sending email
408+
409+
The `sendmail` binary is available through [DragonFly Mail Agent (DMA)](https://wiki.mageia.org/en/Dma_Dragonfly_Mail_Agent) to make the [`mail()`](https://www.php.net/manual/de/function.mail.php) function work. Without configuration, it sends email directly, using `[email protected]` as the sender by default - this won't work for various reasons (greylisting, spam blacklists, SPF record of example.org, ...), and email is quite complex to set up correctly with direct delivery.
410+
411+
**Important**: To reliably send email, you thus should specify a smarthost which will be used as an SMTP relay - all you need is an account at any email provider that supports SMTP (ideally suited for mass/transactional mails, according to your usecase - e.g. Mailgun, Postmark, or a self-hosted [Postal](https://github.com/postalhq/postal) instance). Then, to configure DMA, you'll just have to set the following environment variables:
412+
413+
```bash
414+
# your sender address
415+
416+
# your smarthost settings
417+
DMA_CONF_SMARTHOST=smtp.example.org
418+
DMA_AUTH_USERNAME=noreply
419+
DMA_AUTH_PASSWORD=helloworld123
420+
# further DMA settings, according to the DMA man page, prefixed with DMA_CONF_
421+
# (see https://manpages.debian.org/unstable/dma/sendmail.8.en.html#dma.conf)
422+
DMA_CONF_STARTTLS=1
423+
```
424+
425+
DMA is **installed by default in the fat images**. If you are using the "*slim*" images, you need to install it by passing
426+
a single argument before the "FROM" clause in your Dockerfile:
427+
428+
```Dockerfile
429+
ARG INSTALL_DMA=1
430+
FROM thecodingmachine/php:7.4-v3-slim-apache
431+
# The build triggers automatically the installation of DragonFly Mail Agent
432+
```
433+
434+
407435
## Setting up CRON jobs
408436

409437
You can set up CRON jobs using environment variables too.

utils/README.blueprint.md

+28
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,34 @@ ENV APACHE_RUN_USER=www-data \
359359
```
360360

361361

362+
## Sending email
363+
364+
The `sendmail` binary is available through [DragonFly Mail Agent (DMA)](https://wiki.mageia.org/en/Dma_Dragonfly_Mail_Agent) to make the [`mail()`](https://www.php.net/manual/de/function.mail.php) function work. Without configuration, it sends email directly, using `[email protected]` as the sender by default - this won't work for various reasons (greylisting, spam blacklists, SPF record of example.org, ...), and email is quite complex to set up correctly with direct delivery.
365+
366+
**Important**: To reliably send email, you thus should specify a smarthost which will be used as an SMTP relay - all you need is an account at any email provider that supports SMTP (ideally suited for mass/transactional mails, according to your usecase - e.g. Mailgun, Postmark, or a self-hosted [Postal](https://github.com/postalhq/postal) instance). Then, to configure DMA, you'll just have to set the following environment variables:
367+
368+
```bash
369+
# your sender address
370+
371+
# your smarthost settings
372+
DMA_CONF_SMARTHOST=smtp.example.org
373+
DMA_AUTH_USERNAME=noreply
374+
DMA_AUTH_PASSWORD=helloworld123
375+
# further DMA settings, according to the DMA man page, prefixed with DMA_CONF_
376+
# (see https://manpages.debian.org/unstable/dma/sendmail.8.en.html#dma.conf)
377+
DMA_CONF_STARTTLS=1
378+
```
379+
380+
DMA is **installed by default in the fat images**. If you are using the "*slim*" images, you need to install it by passing
381+
a single argument before the "FROM" clause in your Dockerfile:
382+
383+
```Dockerfile
384+
ARG INSTALL_DMA=1
385+
FROM thecodingmachine/php:{{ $image.php_version }}-v3-slim-apache
386+
# The build triggers automatically the installation of DragonFly Mail Agent
387+
```
388+
389+
362390
## Setting up CRON jobs
363391

364392
You can set up CRON jobs using environment variables too.

0 commit comments

Comments
 (0)