6.0.0-beta1
8/10/25

[#923] Patch to allow specifying per-server SMTP port
Summary Patch to allow specifying per-server SMTP port
Queue IMP
Queue Version 3.2.6
Type Enhancement
State Resolved
Priority 1. Low
Owners
Requester bergonz (at) labs (dot) it
Created 12/01/2004 (7557 days ago)
Due
Updated 12/12/2004 (7546 days ago)
Assigned 12/12/2004 (7546 days ago)
Resolved 12/12/2004 (7546 days ago)
Milestone
Patch No

History
12/12/2004 06:37:08 AM Michael Slusarz State ⇒ Resolved
 
12/12/2004 06:36:56 AM Michael Slusarz Comment #3
State ⇒ Assigned
Reply to this comment
Implemented in HEAD.
12/07/2004 11:30:58 PM Chuck Hagenbuch Comment #2 Reply to this comment
You should make this a patch against IMP 4.0 (HEAD, soon to be 
released) instead, we're not adding features to 3.x anymore.
12/01/2004 09:46:00 AM bergonz (at) labs (dot) it Comment #1
State ⇒ New
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Patch to allow specifying per-server SMTP port
Queue ⇒ IMP
Reply to this comment
Due to a strange setup I have here, I needed to specify  per-server 
SMTP port. Here is the trivial patch:



*** lib/IMP.php.orig        2004-12-01 10:38:37.000000000 +0100

--- lib/IMP.php     2004-12-01 10:32:25.000000000 +0100

***************

*** 87,92 ****

--- 87,96 ----

                   !empty($servers[$server]['smtphost'])) {

                   $_SESSION['imp']['smtphost'] = 
$servers[$server]['smtphost'];

               }

+             if (($conf['mailer']['type'] == 'smtp') &&

+                 !empty($servers[$server]['smtpport'])) {

+                 $_SESSION['imp']['smtpport'] = 
$servers[$server]['smtpport'];

+             }

           } else {

               foreach ($servers as $key => $curServer) {

                   if (!isset($server_key) && substr($key, 0, 1) != '_') {

***************

*** 1130,1135 ****

--- 1134,1142 ----

            if (!empty($_SESSION['imp']['smtphost'])) {

                $params['host'] = $_SESSION['imp']['smtphost'];

            }

+          if (!empty($_SESSION['imp']['smtpport'])) {

+              $params['port'] = $_SESSION['imp']['smtpport'];

+          }



           /*

            * If SMTP authentication has been requested, populate the 
username and

*** servers.php.dist.orig       2004-12-01 10:43:17.000000000 +0100

--- servers.php.dist    2004-12-01 10:44:04.000000000 +0100

***************

*** 63,68 ****

--- 63,72 ----

    * IMP will use this host for outbound SMTP connections.  This value

    * overrides any existing $conf['mailer']['params']['host'] value 
at runtime.

    *

+  * smtpport: If specified, and $conf['mailer']['type'] is set to 'smtp',

+  * IMP will use this port for outbound SMTP connections.  This value

+  * overrides any existing $conf['mailer']['params']['port'] value at 
runtime.

+  *

    * realm: What to append to usernames for preferences and Horde

    * authentication to prevent login clashes on virtual host setups.

    *


Saved Queries