[prev in list] [next in list] [prev in thread] [next in thread]
List: squirrelmail-cvs
Subject: [SM-CVS] SF.net SVN: squirrelmail:[13238]
From: pdontthink () users ! sourceforge ! net
Date: 2008-07-19 7:31:44
Message-ID: E1KK6uu-0005v7-Hq () dn4whf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 13238
http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=13238&view=rev
Author: pdontthink
Date: 2008-07-19 07:31:43 +0000 (Sat, 19 Jul 2008)
Log Message:
-----------
Allow a different server address for the POP server to be configured when using POP \
before SMTP
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/ChangeLog
branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php
branches/SM-1_4-STABLE/squirrelmail/config/conf.pl
branches/SM-1_4-STABLE/squirrelmail/config/config_default.php
branches/SM-1_4-STABLE/squirrelmail/src/compose.php
branches/SM-1_4-STABLE/squirrelmail/src/configtest.php
branches/SM-1_4-STABLE/squirrelmail/src/read_body.php
Modified: branches/SM-1_4-STABLE/squirrelmail/ChangeLog
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/ChangeLog 2008-07-19 04:38:04 UTC (rev 13237)
+++ branches/SM-1_4-STABLE/squirrelmail/ChangeLog 2008-07-19 07:31:43 UTC (rev 13238)
@@ -11,6 +11,8 @@
long been in the file-based preference backend
- Removed the Address Take (abook_take) plugin; please see the Add
Address (third party) plugin.
+ - Allow a different server address for the POP server to be
+ configured when using POP before SMTP.
Version 1.4.15 - 23 May 2008
----------------------------
Modified: branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php 2008-07-19 \
04:38:04 UTC (rev 13237)
+++ branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php 2008-07-19 \
07:31:43 UTC (rev 13238) @@ -27,11 +27,11 @@
}
}
- function initStream($message, $domain, $length=0, $host='', $port='', $user='', \
$pass='', $authpop=false) { + function initStream($message, $domain, $length=0, \
$host='', $port='', $user='', $pass='', $authpop=false, $pop_host='') { global \
$use_smtp_tls, $smtp_auth_mech;
if ($authpop) {
- $this->authPop($host, '', $user, $pass);
+ $this->authPop($pop_host, '', $user, $pass);
}
$rfc822_header = $message->rfc822_header;
Modified: branches/SM-1_4-STABLE/squirrelmail/config/conf.pl
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/config/conf.pl 2008-07-19 04:38:04 UTC (rev \
13237)
+++ branches/SM-1_4-STABLE/squirrelmail/config/conf.pl 2008-07-19 07:31:43 UTC (rev \
13238) @@ -283,6 +283,7 @@
$useSendmail = "false" if ( lc($useSendmail) ne "true" );
$sendmail_path = "/usr/sbin/sendmail" if ( !$sendmail_path );
$pop_before_smtp = "false" if ( !$pop_before_smtp ) ;
+$pop_before_smtp_host = '' if ( !$pop_before_smtp_host ) ;
$default_unseen_notify = 2 if ( !$default_unseen_notify );
$default_unseen_type = 1 if ( !$default_unseen_type );
$config_use_color = 0 if ( !$config_use_color );
@@ -1123,9 +1124,34 @@
$new_pop_before_smtp = <STDIN>;
$new_pop_before_smtp =~ tr/yn//cd;
- return "true" if ( $new_pop_before_smtp eq "y" );
- return "false" if ( $new_pop_before_smtp eq "n" );
- return $pop_before_smtp;
+ if ( $new_pop_before_smtp eq "y" ) {
+ $new_pop_before_smtp = "true";
+ } elsif ( $new_pop_before_smtp eq "n" ) {
+ $new_pop_before_smtp = "false";
+ } else {
+ $new_pop_before_smtp = $pop_before_smtp;
+ }
+
+ # if using POP before SMTP, allow setting of custom POP server address
+ if ($new_pop_before_smtp eq "true") {
+ print "$NRM\nIf the address of the POP server is not the same as\n";
+ print "your SMTP server, you may specify it here. Leave blank (to\n";
+ print "clear this, enter only spaces) to use the same address as\n";
+ print "your SMTP server.\n";
+ print "POP before SMTP server address [$WHT$pop_before_smtp_host$NRM]: \
$WHT"; +
+ $new_pop_before_smtp_host = <STDIN>;
+ if ( $new_pop_before_smtp_host eq "\n" ) {
+ $new_pop_before_smtp_host = $pop_before_smtp_host;
+ } elsif ($new_pop_before_smtp_host =~ /^\s+$/) {
+ $new_pop_before_smtp_host = '';
+ } else {
+ $new_pop_before_smtp_host =~ s/[\r|\n]//g;
+ }
+ $pop_before_smtp_host = $new_pop_before_smtp_host;
+ }
+
+ return $new_pop_before_smtp;
}
# imap_server_type
@@ -3224,6 +3250,8 @@
# boolean
print CF "\$pop_before_smtp = $pop_before_smtp;\n";
# string
+ print CF "\$pop_before_smtp_host = '$pop_before_smtp_host';\n";
+ # string
print CF "\$imap_server_type = '$imap_server_type';\n";
# boolean
print CF "\$invert_time = $invert_time;\n";
Modified: branches/SM-1_4-STABLE/squirrelmail/config/config_default.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/config/config_default.php 2008-07-19 04:38:04 \
UTC (rev 13237)
+++ branches/SM-1_4-STABLE/squirrelmail/config/config_default.php 2008-07-19 07:31:43 \
UTC (rev 13238) @@ -309,6 +309,18 @@
$pop_before_smtp = false;
+/**
+ * POP before SMTP server address
+ *
+ * When using POP3 before SMTP, if the POP server address is
+ * not the same as the SMTP server address, specify it here.
+ * If this is left empty, the SMTP server address will be
+ * used by default.
+ * @global bool $pop_before_smtp_host
+ */
+$pop_before_smtp_host = '';
+
+
/*** Folder Settings ***/
/**
* Default IMAP folder prefix
Modified: branches/SM-1_4-STABLE/squirrelmail/src/compose.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/src/compose.php 2008-07-19 04:38:04 UTC (rev \
13237)
+++ branches/SM-1_4-STABLE/squirrelmail/src/compose.php 2008-07-19 07:31:43 UTC (rev \
13238) @@ -1561,17 +1561,19 @@
if (!$useSendmail && !$draft) {
require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
$deliver = new Deliver_SMTP();
- global $smtpServerAddress, $smtpPort, $pop_before_smtp;
+ global $smtpServerAddress, $smtpPort, $pop_before_smtp, \
$pop_before_smtp_host;
$authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false;
$user = '';
$pass = '';
+ if (empty($pop_before_smtp_host))
+ $pop_before_smtp_host = $smtpServerAddress;
get_smtp_user($user, $pass);
$stream = $deliver->initStream($composeMessage,$domain,0,
- $smtpServerAddress, $smtpPort, $user, $pass, $authPop);
+ $smtpServerAddress, $smtpPort, $user, $pass, $authPop, \
$pop_before_smtp_host); } elseif (!$draft) {
require_once(SM_PATH . 'class/deliver/Deliver_SendMail.class.php');
global $sendmail_path, $sendmail_args;
Modified: branches/SM-1_4-STABLE/squirrelmail/src/configtest.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/src/configtest.php 2008-07-19 04:38:04 UTC \
(rev 13237)
+++ branches/SM-1_4-STABLE/squirrelmail/src/configtest.php 2008-07-19 07:31:43 UTC \
(rev 13238) @@ -368,15 +368,16 @@
/* POP before SMTP */
if($pop_before_smtp) {
- $stream = fsockopen($smtpServerAddress, 110, $err_no, $err_str);
+ if (empty($pop_before_smtp_host)) $pop_before_smtp_host = \
$smtpServerAddress; + $stream = fsockopen($pop_before_smtp_host, 110, $err_no, \
$err_str); if (!$stream) {
- do_err("Error connecting to POP Server ($smtpServerAddress:110) "
+ do_err("Error connecting to POP Server ($pop_before_smtp_host:110) "
. $err_no . ' : ' . htmlspecialchars($err_str));
}
$tmp = fgets($stream, 1024);
if (substr($tmp, 0, 3) != '+OK') {
- do_err("Error connecting to POP Server ($smtpServerAddress:110)"
+ do_err("Error connecting to POP Server ($pop_before_smtp_host:110)"
. ' '.htmlspecialchars($tmp));
}
fputs($stream, 'QUIT');
Modified: branches/SM-1_4-STABLE/squirrelmail/src/read_body.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/src/read_body.php 2008-07-19 04:38:04 UTC \
(rev 13237)
+++ branches/SM-1_4-STABLE/squirrelmail/src/read_body.php 2008-07-19 07:31:43 UTC \
(rev 13238) @@ -316,17 +316,19 @@
} else {
require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
$deliver = new Deliver_SMTP();
- global $smtpServerAddress, $smtpPort, $pop_before_smtp;
+ global $smtpServerAddress, $smtpPort, $pop_before_smtp, \
$pop_before_smtp_host;
$authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false;
$user = '';
$pass = '';
+ if (empty($pop_before_smtp_host))
+ $pop_before_smtp_host = $smtpServerAddress;
get_smtp_user($user, $pass);
$stream = $deliver->initStream($composeMessage,$domain,0,
- $smtpServerAddress, $smtpPort, $user, $pass, $authPop);
+ $smtpServerAddress, $smtpPort, $user, $pass, $authPop, \
$pop_before_smtp_host); }
$success = false;
if ($stream) {
@@ -909,6 +911,7 @@
}
}
+//FIXME: one of these hooks should be removed if we can verify disuse (html_bottom?)
do_hook('read_body_bottom');
do_hook('html_bottom');
sqimap_logout($imapConnection);
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic