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 DNSLookupContinuation
checkSPFLogged
(SPFSession spfData) Generate the explanation and set it in SPF1Data so it can be accessed easy later if neededvoid
enableMacroExpand
(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:
checkSPFLogged
in classGenericModifier
- Parameters:
spfData
- The SPF1Data which should used- Throws:
PermErrorException
TempErrorException
NoneException
NeutralException
-
onDNSResponse
public DNSLookupContinuation onDNSResponse(DNSResponse lookup, SPFSession spfData) throws PermErrorException, TempErrorException, NeutralException, NoneException Description copied from interface:SPFCheckerDNSResponseListener
Continue the check for SPF with the given values and the given DNSResponse- Specified by:
onDNSResponse
in 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:MacroExpandEnabled
Provide component with a DNSService.- Specified by:
enableMacroExpand
in interfaceMacroExpandEnabled
- Parameters:
macroExpand
- the macroExpand service. Must not benull
.- See Also:
-