$show_alternative_names = 'false' if ( !$show_alternative_names );
$available_languages = 'all' if ( !$available_languages );
$aggressive_decoding = 'false' if ( !$aggressive_decoding );
-$loosy_encoding = 'false' if ( !$loosy_encoding );
+$lossy_encoding = 'false' if ( !$lossy_encoding );
$advanced_tree = 'false' if ( !$advanced_tree );
$oldway = 'false' if ( !$oldway );
$use_icons = 'false' if ( !$use_icons );
print "3. Show alternative language names : $WHT$show_alternative_names$NRM\n";
print "4. Available languages : $WHT$available_languages$NRM\n";
print "5. Enable aggressive decoding : $WHT$aggressive_decoding$NRM\n";
- print "6. Enable loosy encoding : $WHT$loosy_encoding$NRM\n";
+ print "6. Enable lossy encoding : $WHT$lossy_encoding$NRM\n";
print "\n";
print "R Return to Main Menu\n";
} elsif ( $menu == 11 ) {
elsif ( $command == 3 ) { $show_alternative_names = commandA3(); }
elsif ( $command == 4 ) { $available_languages = commandA4(); }
elsif ( $command == 5 ) { $aggressive_decoding = commandA5(); }
- elsif ( $command == 6 ) { $loosy_encoding = commandA6(); }
+ elsif ( $command == 6 ) { $lossy_encoding = commandA6(); }
} elsif ( $menu == 11 ) {
if ( $command == 1 ) { $advanced_tree = commandB1(); }
elsif ( $command == 2 ) { $oldway = commandB2(); }
print " to use the default logo, use ../images/sm_logo.png\n";
print " - To specify a logo defined outside the SquirrelMail source tree\n";
print " use the absolute URL the webserver would use to include the file\n";
- print " e.g. http://some.host.com/images/mylogo.gif or /images/mylogo.jpg\n";
+ print " e.g. http://www.example.com/images/mylogo.gif or /images/mylogo.jpg\n";
print "\n";
print "[$WHT$org_logo$NRM]: $WHT";
$new_org_logo = <STDIN>;
# domain
sub command11 {
print "The domain name is the suffix at the end of all email addresses. If\n";
- print "for example, your email address is jdoe\@myorg.com, then your domain\n";
- print "would be myorg.com.\n";
+ print "for example, your email address is jdoe\@example.com, then your domain\n";
+ print "would be example.com.\n";
print "\n";
print "[$WHT$domain$NRM]: $WHT";
$new_domain = <STDIN>;
print " ERROR TESTING\n";
close $sock;
} else {
- print $sock "mail from: tester\@squirrelmail.org\n";
+ print $sock "HELO $domain\r\n";
$got = <$sock>; # Discard
- print $sock "rcpt to: junk\@microsoft.com\n";
+ print $sock "MAIL FROM:<tester\@squirrelmail.org>\r\n";
+ $got = <$sock>; # Discard
+ print $sock "RCPT TO:<junk\@microsoft.com\r\n";
$got = <$sock>; # This is the important line
if ($got =~ /^250\b/) { # SMTP will relay without auth
print "SUPPORTED$NRM\n";
} else {
print "NOT SUPPORTED$NRM\n";
}
- print $sock "rset\n";
- print $sock "quit\n";
+ print $sock "RSET\r\n";
+ print $sock "QUIT\r\n";
close $sock;
}
# Try login (SquirrelMail default)
return $aggressive_decoding;
}
-# Loosy encoding
+# Lossy encoding
sub commandA6 {
- print "Enable this option if you want to allow loosy charset encoding in message\n";
+ print "Enable this option if you want to allow lossy charset encoding in message\n";
print "composition pages. This option allows charset conversions when output\n";
print "charset does not support all symbols used in original charset. Symbols\n";
print "unsupported by output charset will be replaced with question marks.\n";
print "\n";
- if ( lc($loosy_encoding) eq 'true' ) {
+ if ( lc($lossy_encoding) eq 'true' ) {
$default_value = "y";
} else {
$default_value = "n";
}
- print "Enable loosy encoding? (y/n) [$WHT$default_value$NRM]: $WHT";
- $loosy_encoding = <STDIN>;
- if ( ( $loosy_encoding =~ /^y\n/i ) || ( ( $loosy_encoding =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
- $loosy_encoding = 'true';
+ print "Enable lossy encoding? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $lossy_encoding = <STDIN>;
+ if ( ( $lossy_encoding =~ /^y\n/i ) || ( ( $lossy_encoding =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
+ $lossy_encoding = 'true';
} else {
- $loosy_encoding = 'false';
+ $lossy_encoding = 'false';
}
- return $loosy_encoding;
+ return $lossy_encoding;
}
# boolean
print CF "\$aggressive_decoding = $aggressive_decoding;\n";
# boolean
- print CF "\$loosy_encoding = $loosy_encoding;\n";
+ print CF "\$lossy_encoding = $lossy_encoding;\n";
print CF "\n";
# string
}
if ($service eq 'SMTP') {
- $cmd = "AUTH $mech\n";
- $logout = "QUIT\n";
+ $cmd = "AUTH $mech\r\n";
+ $logout = "QUIT\r\n";
} elsif ($service eq 'IMAP') {
$cmd = "A01 AUTHENTICATE $mech\n";
$logout = "C01 LOGOUT\n";
if ($service eq 'SMTP') {
# Say hello first..
- print $sock "helo $domain\n";
+ print $sock "HELO $domain\r\n";
$discard = <$sock>; # Yeah yeah, you're happy to see me..
}
print $sock $cmd;
if ($service eq 'SMTP') {
if (($response =~ /^535/) or ($response =~/^502/)) {
# Not supported
+ print $sock $logout;
close $sock;
return 'NO';
} elsif ($response =~ /^503/) {
} elsif ($service eq 'IMAP') {
if ($response =~ /^A01/) {
# Not supported
+ print $sock $logout;
close $sock;
return 'NO';
}