Bläddra i källkod

tweaked conf.pl
added patch from Bill Thousand to allow sending with virtual domains
(see smtp.php for more info in function sendSMTP)

Luke Ehresman 25 år sedan
förälder
incheckning
b426710f20
3 ändrade filer med 37 tillägg och 9 borttagningar
  1. 2 1
      ChangeLog
  2. 6 6
      config/conf.pl
  3. 29 2
      functions/smtp.php

+ 2 - 1
ChangeLog

@@ -1,5 +1,7 @@
 Version 0.5pre2 -- DEVELOPMENT
 ------------------------------
+- Added a patch from Bill Thousand to allow easier virtual domains
+- Security updates with attachments
 - Added more hooks for plugins, updated plugin.txt
 - Improved HTML address book
 - Fixed bugs in parsing email addresses in smtp.php
@@ -10,7 +12,6 @@ Version 0.5pre2 -- DEVELOPMENT
 - Made message highlighting case insensative
 - Added French translation from Ali Nedjimi <lrdfrx@club-internet.fr>
 
-
 Version 0.5pre1 -- August 9, 2000 
 ---------------------------------
 - Searching folders functionality added 

+ 6 - 6
config/conf.pl

@@ -252,11 +252,6 @@ while (($command ne "q") && ($command ne "Q")) {
       print "8.  Plugins\n";
       print "\n";
       print "D.  Set pre-defined settings for specific IMAP servers\n";
-      if ($config_use_color == 1) {
-         print "C.  Turn color off\n";
-      } else {
-         print "C.  Turn color on\n";
-      }
       print "\n";
    } elsif ($menu == 1) {
       print $WHT."Organization Preferences\n".$NRM;
@@ -374,6 +369,11 @@ while (($command ne "q") && ($command ne "Q")) {
       print "\n";
       print "R   Return to Main Menu\n";
    }
+   if ($config_use_color == 1) {
+      print "C.  Turn color off\n";
+   } else {
+      print "C.  Turn color on\n";
+   }
    print "S   Save data\n";
    print "Q   Quit\n";
 
@@ -409,7 +409,7 @@ while (($command ne "q") && ($command ne "Q")) {
          $WHT = "\x1B[37;1m";
          $NRM = "\x1B[0m";
       }
-   } elsif (($command eq "d") || ($command eq "D")) {
+   } elsif ((($command eq "d") || ($command eq "D")) && $menu == 0) {
       set_defaults ();
    } else {
       $saved = 0;

+ 29 - 2
functions/smtp.php

@@ -285,8 +285,35 @@
       $bcc = parseAddrs($b);
       $from_addr = getPref($data_dir, $username, "email_address");
 
-      if ($from_addr == "")
-         $from_addr = "$username@$domain";
+
+      /*
+       *  A patch from Bill Thousand <billyt@claritytech.com>
+       *
+       *  "I don't know if anyone else needs this or not, but it totally makes squirrelmail usable for us.
+       *  This quick patch checks the username and from address for the domain information.  We use
+       *  a virtual domain patch for our imap server that allows multiple domains by using username@domain.com
+       *  as the login username."
+       */
+      if ($from_addr == "") {
+         if (strstr($username, "@")) {
+            $from_addr = $username;
+            $address_pieces = explode("@",$username);
+            $domain = $address_pieces[1];
+         } else {
+            $from_addr = "$username@$domain";
+         }
+      } else {
+         // If the From Address is specified, use the domain in the from
+         // address if it's there.
+         if (strstr($from_addr, "@")) {
+            $address_pieces = explode("@", $from_addr);
+            $domain = $address_pieces[1];
+         }
+      }
+      /*
+       *  End patch from Bill Thousand
+       */
+
 
       $smtpConnection = fsockopen($smtpServerAddress, $smtpPort, $errorNumber, $errorString);
       if (!$smtpConnection) {