mirror of
https://github.com/webmin/webmin.git
synced 2026-03-07 03:32:04 +00:00
Check for Authen::SASL perl module, offer to install it
This commit is contained in:
@@ -928,6 +928,7 @@ sendmail_fromaddr=Address
|
||||
sendmail_err=Failed to save mail sending options
|
||||
sendmail_esmtp=Missing or un-resolvable SMTP server hostname
|
||||
sendmail_elogin=Missing SMTP server login
|
||||
sendmail_esasl=SMTP authentication cannot be enabled unless the <a href=$1>$2</a> Perl module is installed.
|
||||
sendmail_efrom=Missing or incorrectly formatted from address
|
||||
|
||||
web_title=Web Server Options
|
||||
|
||||
@@ -28,6 +28,15 @@ if ($in{'login_def'}) {
|
||||
}
|
||||
else {
|
||||
$in{'login_user'} =~ /^\S+$/ || &error($text{'sendmail_elogin'});
|
||||
eval "use Authen::SASL";
|
||||
if ($@) {
|
||||
# Perl module missing
|
||||
&error(&text('sendmail_esasl',
|
||||
"/cpan/download.cgi?source=3&cpan=Authen::SASL&".
|
||||
"mode=2&return=/$module_name/&returndesc=".
|
||||
&urlize($text{'index_return'}),
|
||||
"Authen::SASL"));
|
||||
}
|
||||
$mconfig{'smtp_user'} = $in{'login_user'};
|
||||
$mconfig{'smtp_pass'} = $in{'login_pass'};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user