diff --git a/README.md b/README.md index b8b62e0..c0d9aa2 100644 --- a/README.md +++ b/README.md @@ -190,16 +190,12 @@ environment variables mentioned above (`MAILMAN_ADMIN_USER` & `MAILMAN_ADMIN_EMAIL`), no password is set for your admin account. To set a password, plese follow the "Forgot Password" link on the "Sign In" page. -To configure the mailman-web container to send emails, add this to your -`settings_local.py`: +Mailman web is already configured to send emails through `$SMTP_HOST` as the +MTA's address. If you want to modify it, you can set the value in under +docker-compose.yaml for mailman-web container. By default, `SMTP_HOST` points +to the gateway of the web container, which is the host itself. -``` -EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' -EMAIL_HOST = 'smtp.example.com' -EMAIL_PORT = 25 -``` - -Alternatively, you can use the environment variables `SMTP_HOST` (defaults to +You can also use the environment variables `SMTP_HOST` (defaults to the container's gateway), `SMTP_PORT` (defaults to `25`), `SMTP_HOST_USER` (defaults to an empty string), `SMTP_HOST_PASSWORD` (defaults to an empty string), `SMTP_USE_TLS` (defaults to `False`) and `SMTP_USE_SSL` (defaults to `False`). @@ -408,6 +404,21 @@ at port 25. The final configuration can be found by executing: $ docker exec mailman-core cat /etc/mailman.cfg ``` +The postfix configuration that is generated looks like this: +``` +[mta] +incoming: mailman.mta.postfix.LMTP +outgoing: mailman.mta.deliver.deliver +lmtp_host: $MM_HOSTNAME +lmtp_port: 8024 +smtp_host: $SMTP_HOST +smtp_port: $SMTP_PORT +configuration: /etc/postfix-mailman.cfg +``` + +So, if you need to update the values, you can set `SMTP_HOST`, `SMTP_PORT`, +`MM_HOSTNAME` environment variables in `mailman-core` container. + Please verify the output for `[mta]` section to ensure that it points to the right `smtp_host` (address to reach postfix from mailman-core container) and `lmtp_host` (address to reach mailman-core container from postfix).