spf-discuss
[Top] [All Lists]

Re: [spf-discuss] Re: libspf2 sample programs

2007-01-09 11:23:19
I've tried to go to Mail::SPF version 2.002 (which I believe is current) 
but when I do a 'make test', I get the following.  I'm running on 
SunSolaris 2.8, Perl 5.6.1 --

bash-2.03# cd ../Mail-SPF-2.002/
bash-2.03# make test
/usr/local/bin/perl Build --makefile_env_macros 1 test
t/00.00-class-misc............Using /usr/local/opt/Mail-SPF-2.002/blib
t/00.00-class-misc............ok
t/00.01-class-util............Using /usr/local/opt/Mail-SPF-2.002/blib

#   Failed test 'use Mail::SPF::Util;'
t/00.01-class-util............NOK 1/16#   at t/00.01-class-util.t line 14.
#     Tried to use 'Mail::SPF::Util'.
#     Error:  Constant name 'HASH(0x30404c)' has invalid characters at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Util.pm line 230
# BEGIN failed--compilation aborted at t/00.01-class-util.t line 14.
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at (eval 3) line 2.
t/00.01-class-util............ok 2/16# Looks like you failed 1 test of 16.
t/00.01-class-util............dubious
        Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 1
        Failed 1/16 tests, 93.75% okay
t/00.02-class-request.........Using /usr/local/opt/Mail-SPF-2.002/blib

#   Failed test 'use Mail::SPF::Request;'
t/00.02-class-request.........NOK 1/43#   at t/00.02-class-request.t line 
13.
#     Tried to use 'Mail::SPF::Request'.
#     Error:  Constant name 'HASH(0x30760c)' has invalid characters at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Util.pm line 230
# BEGIN failed--compilation aborted at t/00.02-class-request.t line 13.
# Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Request.pm line 26.
# BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Request.pm line 26.
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at (eval 3) line 2.
Can't locate object method "versions" via package "Mail::SPF::Request" 
(perhaps you forgot to load "Mail::SPF::Request"?) at 
t/00.02-class-request.t line 32.
# Looks like you planned 43 tests but only ran 2.
# Looks like you failed 1 test of 2 run.
# Looks like your test died just after 2.
t/00.02-class-request.........dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1, 3-43
        Failed 42/43 tests, 2.33% okay
t/00.03-class-result..........Using /usr/local/opt/Mail-SPF-2.002/blib
Constant name 'HASH(0x30307c)' has invalid characters at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Util.pm line 230
BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Util.pm line 230.
Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Request.pm line 26.
BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Request.pm line 26.
Compilation failed in require at t/00.03-class-result.t line 9.
BEGIN failed--compilation aborted at t/00.03-class-result.t line 9.
t/00.03-class-result..........dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-16
        Failed 16/16 tests, 0.00% okay
t/00.04-class-server..........Using /usr/local/opt/Mail-SPF-2.002/blib

#   Failed test 'use Mail::SPF::Server;'
t/00.04-class-server..........NOK 1/23#   at t/00.04-class-server.t line 
34.
#     Tried to use 'Mail::SPF::Server'.
#     Error:  Can't locate object method "SWASHNEW" via package "utf8" 
(perhaps you forgot to load "utf8"?) at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Util.pm line 34.
# Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Result.pm line 25.
# BEGIN failed--compilation aborted at t/00.04-class-server.t line 34.
# Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/MacroString.pm line 31.
# BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/MacroString.pm line 31.
# Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Server.pm line 27.
# BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Server.pm line 27.
# Compilation failed in require at (eval 15) line 2.
# BEGIN failed--compilation aborted at (eval 15) line 2.
Can't locate object method "dns_resolver" via package "Mail::SPF::Server" 
(perhaps you forgot to load "Mail::SPF::Server"?) at 
t/00.04-class-server.t line 51.
# Looks like you planned 23 tests but only ran 2.
# Looks like you failed 1 test of 2 run.
# Looks like your test died just after 2.
t/00.04-class-server..........dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1, 3-23
        Failed 22/23 tests, 4.35% okay
t/00.05-class-macrostring.....Using /usr/local/opt/Mail-SPF-2.002/blib
Can't locate object method "SWASHNEW" via package "utf8" (perhaps you 
forgot to load "utf8"?) at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Util.pm line 34.
Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Result.pm line 25.
BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Result.pm line 25.
Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/MacroString.pm line 31.
BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/MacroString.pm line 31.
Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Server.pm line 27.
BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Server.pm line 27.
Compilation failed in require at t/00.05-class-macrostring.t line 9.
BEGIN failed--compilation aborted at t/00.05-class-macrostring.t line 9.
t/00.05-class-macrostring.....dubious
        Test returned status 255 (wstat 65280, 0xff00)
t/00.99-class-misc............Using /usr/local/opt/Mail-SPF-2.002/blib
Unrecognized escape \p in character class passed through before HERE mark 
in regex m/ \p{IsAlpha} [\p << HERE {IsAlnum}\-_.]* / at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Term.pm line 31.
Unrecognized escape \p in character class passed through before HERE mark 
in regex m/
    \p{IsAlnum}*    \p{IsAlpha}    \p{IsAlnum}* |
    \p{IsAlnum}+ - [\p << HERE {IsAlnum}-]* \p{IsAlnum}
/ at /usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Term.pm line 54.
Unrecognized escape \p in character class passed through before HERE mark 
in regex m/
    \. (?x-ism:
    \p{IsAlnum}*    \p{IsAlpha}    \p{IsAlnum}* |
    \p{IsAlnum}+ - [\p << HERE {IsAlnum}-]* \p{IsAlnum}
) \.? |
    (?x-ism:
    %
    (?:
        { \p{IsAlpha} (?-xism:\d*r?) (?-xism:[.\-+,/_=])* } |
        [%_-]
    )
)
/ at /usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Term.pm line 59.
Unrecognized escape \p in character class passed through before HERE mark 
in regex m/ (?x-ism:
    (?:
        (?x-ism:
    %
    (?:
        { \p{IsAlpha} (?-xism:\d*r?) (?-xism:[.\-+,/_=])* } |
        [%_-]
    )
)  |
        (?-xism:[!-\$&-~])
    )*
) (?x-ism:
    \. (?x-ism:
    \p{IsAlnum}*    \p{IsAlpha}    \p{IsAlnum}* |
    \p{IsAlnum}+ - [\p << HERE {IsAlnum}-]* \p{IsAlnum}
) \.? |
    (?x-ism:
    %
    (?:
        { \p{IsAlpha} (?-xism:\d*r?) (?-xism:[.\-+,/_=])* } |
        [%_-]
    )
)
) / at /usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Term.pm line 61.
t/00.99-class-misc............ok 1/17
t/00.99-class-misc............NOK 2/17#   Failed test 'use 
Mail::SPF::Mech;'
#   at t/00.99-class-misc.t line 11.
#     Tried to use 'Mail::SPF::Mech'.
#     Error:  Constant name 'HASH(0x3352b0)' has invalid characters at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Util.pm line 230
# BEGIN failed--compilation aborted at t/00.99-class-misc.t line 11.
# Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Result.pm line 25.
# BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Result.pm line 25.
# Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Record.pm line 30.
# BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Record.pm line 30.
# Compilation failed in require at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Mech.pm line 27.
# BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Mech.pm line 27.
# Compilation failed in require at (eval 8) line 2.
# BEGIN failed--compilation aborted at (eval 8) line 2.

#   Failed test 'use Mail::SPF::Mech::All;'
#   at t/00.99-class-misc.t line 12.
#     Tried to use 'Mail::SPF::Mech::All'.
#     Error:  Can't locate object method 
"explanation_templates_by_result_code" via package "Mail::SPF::Mech::All" 
(perhaps you forgot to load "Mail::SPF::Mech::All"?) at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Mech/All.pm line 35.
# BEGIN failed--compilation aborted at t/00.99-class-misc.t line 12.
# Compilation failed in require at (eval 10) line 2.
# BEGIN failed--compilation aborted at (eval 10) line 2.
t/00.99-class-misc............NOK 3/17
#   Failed test 'use Mail::SPF::Mech::IP4;'
#   at t/00.99-class-misc.t line 13.
#     Tried to use 'Mail::SPF::Mech::IP4'.
#     Error:  Can't locate object method 
"explanation_templates_by_result_code" via package 
"Mail::SPF::SenderIPAddrMech" (perhaps you forgot to load 
"Mail::SPF::SenderIPAddrMech"?) at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/SenderIPAddrMech.pm line 
34.
# BEGIN failed--compilation aborted at t/00.99-class-misc.t line 13.
# Compilation failed in require at (eval 13) line 3.
#       ...propagated at /usr/local/lib/perl5/5.6.1/base.pm line 62.
# BEGIN failed--compilation aborted at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Mech/IP4.pm line 22.
# Compilation failed in require at (eval 12) line 2.
# BEGIN failed--compilation aborted at (eval 12) line 2.
t/00.99-class-misc............NOK 4/17Unrecognized escape \p in character 
class passed through before HERE mark in regex m/ (?x-ism: \p{IsAlpha} [\p 
<< HERE {IsAlnum}\-_.]* ) (?= = ) / at 
/usr/local/opt/Mail-SPF-2.002/blib/lib/Mail/SPF/Mod.pm line 29.
t/00.99-class-misc............ok 17/17# Looks like you failed 3 tests of 
17.
t/00.99-class-misc............dubious
        Test returned status 3 (wstat 768, 0x300)
DIED. FAILED tests 2-4
        Failed 3/17 tests, 82.35% okay
t/10.00-rfc4408...............Using /usr/local/opt/Mail-SPF-2.002/blib
skipped
        all skipped: Mail::SPF::Test required for testing Mail::SPF's RFC 
compliance
t/10.01-rfc4406...............Using /usr/local/opt/Mail-SPF-2.002/blib
skipped
        all skipped: Mail::SPF::Test required for testing Mail::SPF's RFC 
compliance
t/90-author-pod-validation....skipped
        all skipped: Test::Pod 1.00 required for testing POD validity
Failed Test                 Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/00.01-class-util.t           1   256    16    1  1
t/00.02-class-request.t      255 65280    43   83  1 3-43
t/00.03-class-result.t       255 65280    16   32  1-16
t/00.04-class-server.t       255 65280    23   43  1 3-23
t/00.05-class-macrostring.t  255 65280    ??   ??  ??
t/00.99-class-misc.t           3   768    17    3  2-4
3 tests skipped.
Failed 6/10 test scripts. 84/117 subtests failed.
Files=10, Tests=117,  6 wallclock secs ( 5.05 cusr +  0.73 csys =  5.78 
CPU)
Failed 6/10 test programs. 84/117 subtests failed.
*** Error code 11
make: Fatal error: Command failed for target `test'



Please respond to spf-discuss(_at_)v2(_dot_)listbox(_dot_)com

To:     spf-discuss(_at_)v2(_dot_)listbox(_dot_)com
cc:      (bcc: Dan Mitton/YD/RWDOE)
Subject:        Re: [spf-discuss] Re: libspf2 sample programs
LSN: Not Relevant
User Filed as: Not a Record

On Thursday 04 January 2007 21:39, Dan_Mitton(_at_)notes(_dot_)ymp(_dot_)gov 
wrote:
I saw the RFC and the result definitions, however my testing seems to 
get
'unknown' for names that do not resolve.  Names with no SPF records get
'none'.  For example:

bash-2.03# perl -MMail::SPF::Query -le 'print for Mail::SPF::Query->new(
helo=>shift, ipv4=>shift, sender=>shift )->result' foobar 198.147.246.95
foobar
unknown
Please see

http://www.openspf.org/why.html?sender=foobar&ip=198.147.246.95&receiver=ma

gorian: domain of sender foobar does not exist
magorian: error in processing during lookup of foobar

HASH(0x5f0564)
bash-2.03# perl -MMail::SPF::Query -le 'print for Mail::SPF::Query->new(
helo=>shift, ipv4=>shift, sender=>shift )->result' foobar 198.147.246.95
yahoo.com
none
SPF: domain of sender yahoo.com does not designate mailers
magorian: domain of yahoo.com does not designate permitted sender hosts

HASH(0x5f0594)


I will be out of town for a few days, so we can take up this lively (and
very useful, at least for me) discussion then.

I just checked with pyspf (which is one of the two SPF implementations 
validated by the project to be compliant with the RFC 4408 test suite the 
project developed - Mail::SPF::Query is NOT the other one) and it properly 

returns a result of None.

At one point the SPF specs called for an error for non-existent domains 
(Mail::SPF::Query was developed early in the project and has never been 
updated to be compliant with RFC 4408).  It looks to me like you are 
seeing a 
result that is caused by an obsolete design in Mail::SPF::Query.  See 
paragraph 2.2.2 of the last pre-IETF specification:

http://www.openspf.org/svn/project/specs/drafts/draft-mengwong-spf-01.200406.txt


The pyspf library is the engine behind my validator:

http://www.kitterman.com/spf/validate.html

You can check it for yourself.  Mail::SPF is the new RFC 4408 compliant 
PERL 
implementation.  The Java implementation, jSPF is believed by it's 
developers 
to be RFC 4408 compliant, but we haven't fully validated that yet (I have 
no 
reason to doubt them).

http://www.openspf.org/Implementations

Scott K

-------
Sender Policy Framework: http://www.openspf.org/
Archives at http://archives.listbox.com/spf-discuss/current/
To unsubscribe, change your address, or temporarily deactivate your 
subscription, 
please go to http://v2.listbox.com/member/?list_id=735


-------
Sender Policy Framework: http://www.openspf.org/
Archives at http://archives.listbox.com/spf-discuss/current/
To unsubscribe, change your address, or temporarily deactivate your 
subscription, 
please go to http://v2.listbox.com/member/?list_id=735