]> BookStack Code Mirror - bookstack/commitdiff
Allow a user to disable peer check when using TLS/STARTTLS 4126/head
authorVincent Bernat <redacted>
Fri, 24 Mar 2023 08:34:37 +0000 (09:34 +0100)
committerVincent Bernat <redacted>
Fri, 24 Mar 2023 08:34:37 +0000 (09:34 +0100)
This is useful when developing and on Docker setups. Despite setting
encryption to null, if a server supports STARTTLS with a self-signed
certificate, the mailer try to upgrade the connection with STARTTLS.

.env.example.complete
app/Config/mail.php

index f81bccae4702b9ddf2eb0f903713e1956c1976c1..8c0accf1de68d2402942a235c1e4363b9c5f77a9 100644 (file)
@@ -79,6 +79,7 @@ MAIL_PORT=1025
 MAIL_USERNAME=null
 MAIL_PASSWORD=null
 MAIL_ENCRYPTION=null
 MAIL_USERNAME=null
 MAIL_PASSWORD=null
 MAIL_ENCRYPTION=null
+MAIL_VERIFY_PEER=true
 
 # Command to use when email is sent via sendmail
 MAIL_SENDMAIL_COMMAND="/usr/sbin/sendmail -bs"
 
 # Command to use when email is sent via sendmail
 MAIL_SENDMAIL_COMMAND="/usr/sbin/sendmail -bs"
@@ -372,4 +373,4 @@ LOG_FAILED_LOGIN_CHANNEL=errorlog_plain_webserver
 # IP address '146.191.42.4' would result in '146.191.x.x' being logged.
 # For the IPv6 address '2001:db8:85a3:8d3:1319:8a2e:370:7348' this would result as:
 # '2001:db8:85a3:8d3:x:x:x:x'
 # IP address '146.191.42.4' would result in '146.191.x.x' being logged.
 # For the IPv6 address '2001:db8:85a3:8d3:1319:8a2e:370:7348' this would result as:
 # '2001:db8:85a3:8d3:x:x:x:x'
-IP_ADDRESS_PRECISION=4
\ No newline at end of file
+IP_ADDRESS_PRECISION=4
index b57c152d9d8062384ca9ed38d0d14fe9386a540c..6cd5ee28fbb3b9ccbe6e5f1cd64790e2675492a8 100644 (file)
@@ -32,6 +32,7 @@ return [
             'encryption' => env('MAIL_ENCRYPTION', 'tls'),
             'username' => env('MAIL_USERNAME'),
             'password' => env('MAIL_PASSWORD'),
             'encryption' => env('MAIL_ENCRYPTION', 'tls'),
             'username' => env('MAIL_USERNAME'),
             'password' => env('MAIL_PASSWORD'),
+            'verify_peer' => env('MAIL_VERIFY_PEER', true),
             'timeout' => null,
             'local_domain' => env('MAIL_EHLO_DOMAIN'),
         ],
             'timeout' => null,
             'local_domain' => env('MAIL_EHLO_DOMAIN'),
         ],