Skip to content

Commit

Permalink
Allow a user to disable peer check when using TLS/STARTTLS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vincentbernat committed Mar 24, 2023
1 parent 9b66e93 commit f2293a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .env.example.complete
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ MAIL_PORT=1025
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"
Expand Down Expand Up @@ -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_PRECISION=4
IP_ADDRESS_PRECISION=4
1 change: 1 addition & 0 deletions app/Config/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
'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'),
],
Expand Down

0 comments on commit f2293a7

Please sign in to comment.