Commit bb4ebb84 authored by phil's avatar phil

Jessie-Anpassungen für TLS-Verbindungen

TLS mit dem NET:SMTP Module aus Jessie funktioniert nicht. Stattdessen wird NET:SMTPS verwendet
parent ec0b8e49
......@@ -225,6 +225,7 @@ my @required_module = ();
push @required_module, 'Email::Date::Format';
push @required_module, 'Mail::IMAPClient' if $useimap;
push @required_module, 'Net::SMTP::SSL' if $usesmtpssl;
push @required_module, 'Net::SMTPS' if $usesmtptls;
push @required_module, 'IO::Socket::SSL' if $usessl;
push @required_module, ('MIME::Base64','Authen::SASL') if $usesmtpssl && $smtpuser;
push @required_module, 'Authen::SASL' if $smtpuser && !$usesmtpssl && !$usesmtptls;
......@@ -349,12 +350,12 @@ my $maildata = "From: <$sender>\n".
"Serial No: $serial\n";
if (!($usesendmail)) {
module_loader("Net::SMTP");
module_loader("Net::SMTPS");
my $smtp;
eval {
if( $usesmtptls ) {
$smtpport = $default_smtp_tls_port unless $smtpport;
$smtp = Net::SMTP->new($smtphost, Timeout=>$smtptimeout, Port=>$smtpport, starttls=>1, Hello=>$smtpehlo, %other_smtp_opts);
$smtp = Net::SMTPS->new($smtphost, Timeout=>$smtptimeout, Port=>$smtpport, doSSL='starttls', Hello=>$smtpehlo, %other_smtp_opts);
if( $smtp && $smtpuser ) {
$smtp->auth($smtpuser, $smtppasswd);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment