From: pdontthink Date: Fri, 26 Nov 2010 10:02:51 +0000 (+0000) Subject: Unify SMTP auth mechanisms in configuration tool X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=615b279318005eb6df28b2e3ecd61e2053a9cb01 Unify SMTP auth mechanisms in configuration tool git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14076 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/config/conf.pl b/config/conf.pl index 13b6a70a..91682f19 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -1525,7 +1525,7 @@ sub command112a { # SMTP authentication type -# Possible choices: none, plain, cram-md5, digest-md5 +# Possible choices: none, login, plain, cram-md5, digest-md5 sub command112b { if ($use_smtp_tls ne "0") { print "Auto-detection of login methods is unavailable when using TLS or STARTTLS.\n"; @@ -1566,6 +1566,7 @@ sub command112b { print $sock "QUIT\r\n"; close $sock; } + # Try login (SquirrelMail default) print "Testing login:\t\t"; $tmp=detect_auth_support('SMTP',$host,'LOGIN'); @@ -1579,6 +1580,19 @@ sub command112b { print $WHT . "ERROR DETECTING$NRM\n"; } + # Try plain + print "Testing plain:\t\t"; + $tmp=detect_auth_support('SMTP',$host,'PLAIN'); + if (defined($tmp)) { + if ($tmp eq 'YES') { + print $WHT . "SUPPORTED$NRM\n"; + } else { + print $WHT . "NOT SUPPORTED$NRM\n"; + } + } else { + print $WHT . "ERROR DETECTING$NRM\n"; + } + # Try CRAM-MD5 print "Testing CRAM-MD5:\t"; $tmp=detect_auth_support('SMTP',$host,'CRAM-MD5'); @@ -1609,12 +1623,12 @@ sub command112b { print "\nWhat authentication mechanism do you want to use for SMTP connections?\n"; print $WHT . "none" . $NRM . " - Your SMTP server does not require authorization.\n"; print $WHT . "login" . $NRM . " - Plaintext. If you can do better, you probably should.\n"; - print $WHT . "plain" . $NRM . " - SASL PLAIN. You already know it if you need this.\n"; + print $WHT . "plain" . $NRM . " - SASL PLAIN. Plaintext. If you can do better, you probably should.\n"; print $WHT . "cram-md5" . $NRM . " - Slightly better than plaintext.\n"; print $WHT . "digest-md5" . $NRM . " - Privacy protection - better than cram-md5.\n"; print $WHT . "\n*** YOUR SMTP SERVER MUST SUPPORT THE MECHANISM YOU CHOOSE HERE ***\n" . $NRM; print "If you don't understand or are unsure, you probably want \"none\"\n\n"; - print "none, login, cram-md5, or digest-md5 [$WHT$smtp_auth_mech$NRM]: $WHT"; + print "none, login, plain, cram-md5, or digest-md5 [$WHT$smtp_auth_mech$NRM]: $WHT"; $inval=; chomp($inval); if ($inval =~ /^none\b/i) {