james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillermo Grandes" <guillermo.gran...@gmail.com>
Subject Re: svn commit: r449704 - in /james/jspf/trunk/src/main/java/org/apache/james/jspf: SPF.java SPF1Utils.java
Date Mon, 25 Sep 2006 15:44:39 GMT
mmm... I don't like your patch (joke) ;-)

1) It does not seem flexible. only guess yes/no... it does not left space 
for add improvements/customized... snif :'-(

2) SPF1Utils.BEST_GUESS_RECORD = "a/24 mx/24 ptr ~all"
    > ~ softfail
    > ? neutral
    glue records must be pass or neutral (finally ?all) :-)


--- Guillermo

----- Original Message ----- 
From: <norman@apache.org>
To: <server-cvs@james.apache.org>
Sent: Monday, September 25, 2006 5:15 PM
Subject: svn commit: r449704 - in 
/james/jspf/trunk/src/main/java/org/apache/james/jspf: SPF.java 
SPF1Utils.java


> Author: norman
> Date: Mon Sep 25 08:15:18 2006
> New Revision: 449704
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=449704
> Log:
> Add support for best guess. See JSPF-24
>
> Modified:
>    james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java
>    james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF1Utils.java
>
> Modified: james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java
> URL: 
> http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java?view=diff&rev=449704&r1=449703&r2=449704
> ==============================================================================
> --- james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java 
> (original)
> +++ james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java Mon Sep 
> 25 08:15:18 2006
> @@ -52,6 +52,8 @@
>
>     private String defaultExplanation = null;
>
> +    private boolean useBestGuess = false;
> +
>     /**
>      * Uses default Log4JLogger and DNSJava based dns resolver
>      */
> @@ -167,8 +169,14 @@
>         String spfDnsEntry = 
> getSpfRecord(dnsProbe,spfData.getCurrentDomain(),
>                 SPF1Constants.SPF_VERSION);
>
> +        // No SPF-Record found
>         if (spfDnsEntry == null) {
> -            throw new NoneException("No SPF record found for host: " + 
> spfData.getCurrentDomain());
> +            // We should use bestguess
> +            if (useBestGuess == true) {
> +                spfDnsEntry = SPF1Utils.BEST_GUESS_RECORD;
> +            } else {
> +                throw new NoneException("No SPF record found for host: " 
> + spfData.getCurrentDomain());
> +            }
>         }
>
>         // logging
> @@ -302,8 +310,17 @@
>         this.defaultExplanation = defaultExplanation;
>     }
>
> +    /**
> +     * Set to true for using best guess. Best guess will set the 
> SPF-Record to "a/24 mx/24 ptr ~all"
> +     * if no SPF-Record was found for the doamin. When this was happen 
> only pass or netural will be returned.
> +     * Default is false.
> +     *
> +     * @param useBestGuess true to enable best guess
> +     */
> +    public synchronized void setUseBestGuess(boolean useBestGuess) {
> +        this.useBestGuess  = useBestGuess;
> +    }
>
> -
>
>     /**
>      * Get the SPF-Record for a server given it's version
>
> Modified: 
> james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF1Utils.java
> URL: 
> http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF1Utils.java?view=diff&rev=449704&r1=449703&r2=449704
> ==============================================================================
> --- james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF1Utils.java 
> (original)
> +++ james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF1Utils.java 
> Mon Sep 25 08:15:18 2006
> @@ -46,6 +46,8 @@
>     public static final String SOFTFAIL_CONV = "softfail";
>
>     public static final String DEFAULT_EXPLANATION = 
> "http://www.openspf.org/why.html?sender=%{S}&ip=%{I}";
> +
> +    public static final String BEST_GUESS_RECORD = "a/24 mx/24 ptr ~all";
>
>     /**
>      * Convert raw SPF results to SPF names
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message