TclApps Library Source Code
View Ticket
Not logged in
Ticket UUID: 2526629
Title: SPF package is apparently dysfunctional
Type: Bug Version: None
Submitter: rkeene Created on: 2009-01-21 18:15:42
Subsystem: spf Assigned To: patthoyts
Priority: 5 Medium Severity:
Status: Deleted Last Modified: 2013-07-04 18:09:56
Resolution: Not Applicable Here Closed By:
    Closed on:
Description:
SPF package (version 1.1.1) does not work.

% package require spf
1.1.1
% spf::spf 1.2.3.4 example.com [email protected]
none
% spf::SPF example.com
=spf1 ip4:127.1.28.7 -all
% package present dns
1.3.3



Applying the following diff to "spf.tcl" results in correct operations:
--- spf.tcl     2009-01-21 13:09:37.450402473 -0500
+++ spf.tcl.fixed       2009-01-21 12:57:04.043184940 -0500
@@ -579,7 +579,7 @@
             set ndx [lsearch $res rdata]
             incr ndx
             if {$ndx != 0} {
-                append txt [string range [lindex $res $ndx] 1 end]
+                append txt [lindex $res $ndx]
             }
         }
     }


Correct operation output:
% ::spf::spf 1.2.3.4 example.com [email protected]
-
% spf::SPF example.com
v=spf1 ip4:127.1.28.7 -all
User Comments: rkeene added on 2009-01-22 01:21:52:
You can use "oc9.org" as "example.com" in the above for testing