"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/spf.t" between
Mail-SpamAssassin-3.4.4.tar.bz2 and Mail-SpamAssassin-3.4.5.tar.bz2

About: SpamAssassin is a mail filter that uses a wide range of heuristic tests on mail headers and body text to identify "spam" (also known as unsolicited commercial email) incl. Bayesian (statistical) spam filter and several internet-based realtime blacklists.

spf.t  (Mail-SpamAssassin-3.4.4.tar.bz2):spf.t  (Mail-SpamAssassin-3.4.5.tar.bz2)
skipping to change at line 25 skipping to change at line 25
use constant IS_OPENBSD => $^O eq 'openbsd'; use constant IS_OPENBSD => $^O eq 'openbsd';
use constant IS_WINDOWS => ($^O =~ /^(mswin|dos|os2)/i); use constant IS_WINDOWS => ($^O =~ /^(mswin|dos|os2)/i);
use constant AM_ROOT => $< == 0; use constant AM_ROOT => $< == 0;
use constant HAS_UNSAFE_HOSTNAME => # Bug 3806 - module exists and is old use constant HAS_UNSAFE_HOSTNAME => # Bug 3806 - module exists and is old
eval { require Sys::Hostname::Long && Sys::Hostname::Long->VERSION < 1.4 }; eval { require Sys::Hostname::Long && Sys::Hostname::Long->VERSION < 1.4 };
plan skip_all => "Long running tests disabled" unless conf_bool('run_long_tests' ); plan skip_all => "Long running tests disabled" unless conf_bool('run_long_tests' );
plan skip_all => "Net tests disabled" unless conf_bool('run_net_tests'); plan skip_all => "Net tests disabled" unless conf_bool('run_net_tests');
plan skip_all => "Need Mail::SPF or Mail::SPF::Query" unless (HAS_SPFQUERY || HA S_MAILSPF); plan skip_all => "Need Mail::SPF or Mail::SPF::Query" unless (HAS_SPFQUERY || HA S_MAILSPF);
plan skip_all => "root required" unless AM_ROOT;
plan skip_all => "Sys::Hostname::Long > 1.4 required." if HAS_UNSAFE_HOSTNAME; plan skip_all => "Sys::Hostname::Long > 1.4 required." if HAS_UNSAFE_HOSTNAME;
plan skip_all => "Test only designed for Windows, Linux or OpenBSD" unless (IS_L INUX || IS_OPENBSD || IS_WINDOWS); plan skip_all => "Test only designed for Windows, Linux or OpenBSD" unless (IS_L INUX || IS_OPENBSD || IS_WINDOWS);
if(HAS_SPFQUERY && HAS_MAILSPF) { if(HAS_SPFQUERY && HAS_MAILSPF) {
plan tests => 106; plan tests => 110;
} }
else { else {
plan tests => 58; # TODO: These should be skips down in the code, not changing the test count. plan tests => 62; # TODO: These should be skips down in the code, not changing the test count.
} }
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# ensure all rules will fire # ensure all rules will fire
tstlocalrules (" tstlocalrules ("
score SPF_FAIL 0.001 score SPF_FAIL 0.001
score SPF_HELO_FAIL 0.001 score SPF_HELO_FAIL 0.001
score SPF_HELO_NEUTRAL 0.001 score SPF_HELO_NEUTRAL 0.001
score SPF_HELO_SOFTFAIL 0.001 score SPF_HELO_SOFTFAIL 0.001
skipping to change at line 487 skipping to change at line 486
%anti_patterns = (); %anti_patterns = ();
%patterns = ( %patterns = (
q{ SPF_HELO_SOFTFAIL }, 'helo_softfail_from_header', q{ SPF_HELO_SOFTFAIL }, 'helo_softfail_from_header',
q{ SPF_FAIL }, 'fail_from_header', q{ SPF_FAIL }, 'fail_from_header',
); );
sarun ("-t < data/nice/spf3-received-spf", \&patterns_run_cb); sarun ("-t < data/nice/spf3-received-spf", \&patterns_run_cb);
ok_all_patterns(); ok_all_patterns();
# test unwhitelist_auth and unwhitelist_from_spf
tstprefs("
whitelist_auth newsalerts-noreply\@dnsbltest.spamassassin.org
def_whitelist_auth newsalerts-noreply\@dnsbltest.spamassassin.org
unwhitelist_auth newsalerts-noreply\@dnsbltest.spamassassin.org
whitelist_from_spf *\@dnsbltest.spamassassin.org
def_whitelist_from_spf *\@dnsbltest.spamassassin.org
unwhitelist_from_spf *\@dnsbltest.spamassassin.org
");
%patterns = (
q{ SPF_HELO_PASS }, 'helo_pass',
q{ SPF_PASS }, 'pass',
);
%anti_patterns = (
q{ USER_IN_SPF_WHITELIST }, 'spf_whitelist',
q{ USER_IN_DEF_SPF_WL }, 'default_spf_whitelist',
);
sarun ("-t < data/nice/spf1", \&patterns_run_cb);
ok_all_patterns();
 End of changes. 4 change blocks. 
3 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)