mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
When using STARTTLS the SSL_verifycn_name must be set to prevent SSL
Errors
This commit is contained in:
1 parent
1653e58398
commit
e5e9ce7674
1 file changed
+7
-1
@@ -168,7 +168,12 @@ our $smtp_client = 'localhost';
|
||||
|
||||
# send mail encrypted or plaintext
|
||||
# if 'starttls', use STARTTLS; if 'ssl' (or 1), connect securely; otherwise, no security
|
||||
our $smtp_ssl = '';
|
||||
our $smtp_ssl = 'starttls';
|
||||
|
||||
# passed to Net::SMTP constructor for 'ssl' connections or to starttls for 'starttls' connections; should contain extra options for IO::Socket::SSL
|
||||
our $ssl_options = {
|
||||
SSL_verifycn_name => $smtp_server
|
||||
};
|
||||
|
||||
# maximum time in secs to wait for server; default is 120
|
||||
our $smtp_timeout = '120';
|
||||
@@ -556,6 +561,7 @@ sub send_vacation_email {
|
||||
my $smtp_params = {
|
||||
host => $smtp_server,
|
||||
port => $smtp_server_port,
|
||||
ssl_options => $ssl_options,
|
||||
ssl => $smtp_ssl,
|
||||
timeout => $smtp_timeout,
|
||||
localaddr => $smtp_client,
|
||||
|
||||
Reference in new issue
Block a user