aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-22 16:12:52 +0100
committerChocobozzz <me@florianbigard.com>2018-03-22 16:12:52 +0100
commitbebf2d89d335c48659d2e25cb9f6f8310e867fc5 (patch)
tree49548611f335073cd9988c4c5d87a113a1f65cc0
parenta38b297d90a35abc8d5308f74eb2d2b64cef7c21 (diff)
downloadPeerTube-bebf2d89d335c48659d2e25cb9f6f8310e867fc5.tar.gz
PeerTube-bebf2d89d335c48659d2e25cb9f6f8310e867fc5.tar.zst
PeerTube-bebf2d89d335c48659d2e25cb9f6f8310e867fc5.zip
Add option to disable starttls
-rw-r--r--config/default.yaml1
-rw-r--r--config/production.yaml.example1
-rw-r--r--config/test.yaml1
-rw-r--r--server/initializers/constants.ts1
-rw-r--r--server/lib/emailer.ts2
-rw-r--r--support/docker/production/config/production.yaml1
6 files changed, 6 insertions, 1 deletions
diff --git a/config/default.yaml b/config/default.yaml
index 48e5bd067..26fc5c128 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -25,6 +25,7 @@ smtp:
25 username: null 25 username: null
26 password: null 26 password: null
27 tls: true 27 tls: true
28 disable_starttls: false
28 ca_file: null # Used for self signed certificates 29 ca_file: null # Used for self signed certificates
29 from_address: 'admin@example.com' 30 from_address: 'admin@example.com'
30 31
diff --git a/config/production.yaml.example b/config/production.yaml.example
index 45eeffec7..43f45ae80 100644
--- a/config/production.yaml.example
+++ b/config/production.yaml.example
@@ -26,6 +26,7 @@ smtp:
26 username: null 26 username: null
27 password: null 27 password: null
28 tls: true 28 tls: true
29 disable_starttls: false
29 ca_file: null # Used for self signed certificates 30 ca_file: null # Used for self signed certificates
30 from_address: 'admin@example.com' 31 from_address: 'admin@example.com'
31 32
diff --git a/config/test.yaml b/config/test.yaml
index b830a42e7..7e395db04 100644
--- a/config/test.yaml
+++ b/config/test.yaml
@@ -12,6 +12,7 @@ smtp:
12 hostname: null 12 hostname: null
13 port: 1025 13 port: 1025
14 tls: false 14 tls: false
15 disable_starttls: true
15 from_address: 'test-admin@localhost' 16 from_address: 'test-admin@localhost'
16 username: null 17 username: null
17 password: null 18 password: null
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 3cf9ea36d..705d9b520 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -106,6 +106,7 @@ const CONFIG = {
106 USERNAME: config.get<string>('smtp.username'), 106 USERNAME: config.get<string>('smtp.username'),
107 PASSWORD: config.get<string>('smtp.password'), 107 PASSWORD: config.get<string>('smtp.password'),
108 TLS: config.get<boolean>('smtp.tls'), 108 TLS: config.get<boolean>('smtp.tls'),
109 DISABLE_STARTTLS: config.get<boolean>('smtp.disable_starttls'),
109 CA_FILE: config.get<string>('smtp.ca_file'), 110 CA_FILE: config.get<string>('smtp.ca_file'),
110 FROM_ADDRESS: config.get<string>('smtp.from_address') 111 FROM_ADDRESS: config.get<string>('smtp.from_address')
111 }, 112 },
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts
index 1b905e510..f34d141ea 100644
--- a/server/lib/emailer.ts
+++ b/server/lib/emailer.ts
@@ -46,7 +46,7 @@ class Emailer {
46 secure: CONFIG.SMTP.TLS, 46 secure: CONFIG.SMTP.TLS,
47 debug: CONFIG.LOG.LEVEL === 'debug', 47 debug: CONFIG.LOG.LEVEL === 'debug',
48 logger: bunyanLogger as any, 48 logger: bunyanLogger as any,
49 ignoreTLS: isTestInstance() || CONFIG.SMTP.HOSTNAME === 'localhost' || CONFIG.SMTP.HOSTNAME === '127.0.0.1', 49 ignoreTLS: CONFIG.SMTP.DISABLE_STARTTLS,
50 tls, 50 tls,
51 auth 51 auth
52 }) 52 })
diff --git a/support/docker/production/config/production.yaml b/support/docker/production/config/production.yaml
index 9a6cb1094..fdcbeb5a0 100644
--- a/support/docker/production/config/production.yaml
+++ b/support/docker/production/config/production.yaml
@@ -28,6 +28,7 @@ smtp:
28 username: null 28 username: null
29 password: null 29 password: null
30 tls: true 30 tls: true
31 disable_starttls: false
31 ca_file: null # Used for self signed certificates 32 ca_file: null # Used for self signed certificates
32 from_address: 'admin@example.com' 33 from_address: 'admin@example.com'
33 34