Skip to content

fix: Opt-out of implicit TLS for Amavis SMTP client transport#2607

Merged
polarathene merged 2 commits intodocker-mailserver:masterfrom
polarathene:fix/amavis-transport-wrappermode
Jun 5, 2022
Merged

fix: Opt-out of implicit TLS for Amavis SMTP client transport#2607
polarathene merged 2 commits intodocker-mailserver:masterfrom
polarathene:fix/amavis-transport-wrappermode

Conversation

@polarathene
Copy link
Copy Markdown
Member

Description

Explicitly set smtp_tls_wrappermode=no for master.cf:smtp-amavis so that it does not inherit this setting from main.cf when updated for relay-host support, which the configured Amavis transport does not support (at least with smtp_tls_security_level=none).

Additionally adds service names for better visibility of amavis specific master.cf client/server logs.

This change enables supporting relay-host connections over implicit TLS (port 465).

Commit message (verbose description)

Presently relay-host support modifies main.cf settings directly. This adjusts the default transport (smtp) which other transports in master.cf inherit from.

When configuring for implicit TLS to a relay-host this would set main.cf:smtp_tls_wrappermode = yes and affect the transport master.cf:smtp-amavis which does not set an override like it does for smtp_tls_security_level. This causes Amavis to fail working which the default transport relies on due to main.cf:content_filter.

Easy fix, by explicitly adding the override smtp_tls_wrappermode=no.no is default in main.cf so inheriting this setting hasn't been a problem in the past for other relay-hosts using StartTLS.


Fixes: #2601

This is a partial fix for supporting implicit TLS with relay-hosts. The user still needs to configure main.cf to enable smtp_tls_wrappermode = yes with postfix-main.cf or user-patches.sh. We do not document this, and future improvements to relay support are planned to simplify support.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have performed a self-review of my own code
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Presently relay-host support modifies `main.cf` settings directly. This adjusts the default transport (`smtp`) which other transports in `master.cf` inherit from.

When configuring for implicit TLS to a `relay-host` this would set `main.cf:smtp_tls_wrappermode = yes` and affect the transport `master.cf:smtp-amavis` which does not set an override like it does for `smtp_tls_security_level`. This causes Amavis to fail working which the default transport relies on due to `main.cf:content_filter`.

Easy fix, by explicitly adding the override `smtp_tls_wrappermode=no`.`no` is default in `main.cf` so inheriting this setting hasn't been a problem in the past for other relay-hosts using StartTLS.
Copy link
Copy Markdown
Member

@georglauterbach georglauterbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@polarathene polarathene requested review from a team and wernerfred June 1, 2022 01:09
@polarathene polarathene merged commit 5437b0e into docker-mailserver:master Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

relaying: mails are not relayed with implicit tls (465) / improve scripts & configuration

3 participants