Package org.apache.james.jspf.terms
Class ExpModifier
java.lang.Object
org.apache.james.jspf.terms.GenericModifier
org.apache.james.jspf.terms.ExpModifier
- All Implemented Interfaces:
MacroExpandEnabled,SPFChecker,SPFCheckerDNSResponseListener,ConfigurationEnabled,Modifier
public class ExpModifier
extends GenericModifier
implements MacroExpandEnabled, SPFCheckerDNSResponseListener
This class represent the exp modifier
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DNSLookupContinuationcheckSPFLogged(SPFSession spfData) Generate the explanation and set it in SPF1Data so it can be accessed easy later if neededvoidenableMacroExpand(MacroExpand macroExpand) Provide component with a DNSService.onDNSResponse(DNSResponse lookup, SPFSession spfData) Continue the check for SPF with the given values and the given DNSResponsetoString()Methods inherited from class org.apache.james.jspf.terms.GenericModifier
checkSPF, config, enforceSingleInstance, getHost
-
Field Details
-
REGEX
ABNF: explanation = "exp" "=" domain-spec NOTE: the last +"?" has been added to support RFC4408 ERRATA for the EXP modifier. An "exp=" should not result in a perm error but should be ignored. Errata: http://www.openspf.org/RFC_4408/Errata#empty-exp NOTE: the last +"?" has been then removed because OpenSPF released a new testsuite requiring a PermError on "exp=" (see JSPF-56).- See Also:
-
-
Constructor Details
-
ExpModifier
public ExpModifier()
-
-
Method Details
-
checkSPFLogged
protected DNSLookupContinuation checkSPFLogged(SPFSession spfData) throws PermErrorException, TempErrorException, NeutralException, NoneException Generate the explanation and set it in SPF1Data so it can be accessed easy later if needed- Specified by:
checkSPFLoggedin classGenericModifier- Parameters:
spfData- The SPF1Data which should used- Throws:
PermErrorExceptionTempErrorExceptionNoneExceptionNeutralException
-
onDNSResponse
public DNSLookupContinuation onDNSResponse(DNSResponse lookup, SPFSession spfData) throws PermErrorException, TempErrorException, NeutralException, NoneException Description copied from interface:SPFCheckerDNSResponseListenerContinue the check for SPF with the given values and the given DNSResponse- Specified by:
onDNSResponsein interfaceSPFCheckerDNSResponseListener- Parameters:
lookup- The DNSResponse which should be used to run the checkspfData- The SPFSession which should be used to run the check- Throws:
PermErrorException- Get thrown if an error was detectedTempErrorException- Get thrown if a DNS problem was detectedNeutralException- Get thrown if the result should be neutralNoneException- Get thrown if no Record was found- See Also:
-
toString
-
enableMacroExpand
Description copied from interface:MacroExpandEnabledProvide component with a DNSService.- Specified by:
enableMacroExpandin interfaceMacroExpandEnabled- Parameters:
macroExpand- the macroExpand service. Must not benull.- See Also:
-