Merge ~kotodama/charm-postfix-relay/+git/charm-postfix-relay:allow_tls into charm-postfix-relay:master

Proposed by Loïc Gomez
Status: Merged
Approved by: Haw Loeung
Approved revision: 2effc8bc716fcab8d7b5d95c03ca37bfca44fbbf
Merged at revision: 88b5d47b78001553ce685b136686942fac7b06e7
Proposed branch: ~kotodama/charm-postfix-relay/+git/charm-postfix-relay:allow_tls
Merge into: charm-postfix-relay:master
Diff against target: 29 lines (+1/-5)
2 files modified
src/lib/charm/postfix/postfix_relay.py (+0/-2)
src/templates/main.cf (+1/-3)
Reviewer Review Type Date Requested Status
🤖 prod-jenkaas-bootstack (community) continuous-integration Approve
Erhan Sunar (community) Approve
Haw Loeung +1 Approve
Canonical BootStack Charmers Pending
BootStack Reviewers Pending
Review via email: mp+440673@code.launchpad.net

Commit message

Allow to connect to remotes with TLS even if no specific CA is added

Description of the change

smtp_use_tls is the old Postfix 2.2 config option:
http://www.postfix.org/postconf.5.html#smtp_use_tls

With smtp_tls_security_level = may, it allows to connect with TLS if the remote has the capability and falls back to clear text if TLS fails.

FWIW, bionic is on Postfix 3.x

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Loïc Gomez (kotodama) :
Revision history for this message
Haw Loeung (hloeung) wrote :

LGTM

review: Approve (+1)
Revision history for this message
Erhan Sunar (esunar) wrote :

LGTM

review: Approve
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 88b5d47b78001553ce685b136686942fac7b06e7

Revision history for this message
Loïc Gomez (kotodama) wrote :

Many thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/lib/charm/postfix/postfix_relay.py b/src/lib/charm/postfix/postfix_relay.py
2index 2ec90f5..2ca0ac6 100644
3--- a/src/lib/charm/postfix/postfix_relay.py
4+++ b/src/lib/charm/postfix/postfix_relay.py
5@@ -118,8 +118,6 @@ class PostfixContext:
6 """Create the ctxt dictionary from charm config."""
7 ctxt = {}
8 ctxt["config"] = config()
9- if config("ssl_ca"):
10- ctxt["enable_ssl"] = True
11 if config("domain_rewrite_map"):
12 ctxt["have_rewrite_maps"] = True
13 else:
14diff --git a/src/templates/main.cf b/src/templates/main.cf
15index 966fec4..5ca0a84 100644
16--- a/src/templates/main.cf
17+++ b/src/templates/main.cf
18@@ -11,10 +11,8 @@ append_dot_mydomain = no
19
20 readme_directory = no
21
22-{%- if enable_ssl %}
23 ### TLS parameters ###
24-smtp_use_tls = yes
25-{%- endif %}
26+smtp_tls_security_level = may
27
28 {%- if enable_auth %}
29 smtp_sasl_auth_enable = yes

Subscribers

People subscribed via source and target branches

to all changes: