[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] SF.net SVN: squirrelmail:[14094] trunk/squirrelmail
From:       pdontthink () users ! sourceforge ! net
Date:       2011-04-02 19:19:46
Message-ID: E1Q66MM-0006gn-9H () sfp-svn-1 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 14094
          http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=14094&view=rev
Author:   pdontthink
Date:     2011-04-02 19:19:45 +0000 (Sat, 02 Apr 2011)

Log Message:
-----------
Add smtp_auth hook (thanks to Emmanuel Dreyfus)

Modified Paths:
--------------
    trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php
    trunk/squirrelmail/doc/ChangeLog

Modified: trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php
===================================================================
--- trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php	2011-03-11 21:40:38 UTC \
                (rev 14093)
+++ trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php	2011-04-02 19:19:45 UTC \
(rev 14094) @@ -210,7 +210,19 @@
         }
 
         // FIXME: check ehlo response before using authentication
-        if (( $smtp_auth_mech == 'cram-md5') or ( $smtp_auth_mech == 'digest-md5' )) \
{ +
+        // Try authentication by a plugin
+        $smtp_auth_args = array(
+            'auth_mech' => $smtp_auth_mech,
+            'user' => $user,
+            'pass' => $pass,
+            'host' => $host,
+            'port' => $port,
+            'stream' => $stream,
+        );
+        if (boolean_hook_function('smtp_auth', $smtp_auth_args, 1)) {
+            // authentication succeeded
+        } else if (( $smtp_auth_mech == 'cram-md5') or ( $smtp_auth_mech == \
'digest-md5' )) {  // Doing some form of non-plain auth
             if ($smtp_auth_mech == 'cram-md5') {
                 fputs($stream, "AUTH CRAM-MD5\r\n");

Modified: trunk/squirrelmail/doc/ChangeLog
===================================================================
--- trunk/squirrelmail/doc/ChangeLog	2011-03-11 21:40:38 UTC (rev 14093)
+++ trunk/squirrelmail/doc/ChangeLog	2011-04-02 19:19:45 UTC (rev 14094)
@@ -356,6 +356,7 @@
   - Forced addition of a file suffix to attachments that lack a filename
     (helps forwarded messages avoid spam filters) (Thanks to Petr
     Kletecka) (#3139004).
+  - Added smtp_auth hook (Thanks to Emmanuel Dreyfus).
 
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
-----
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