|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.jspf.impl.SPF
public class SPF
This class is used to generate a SPF-Test and provided all intressting data.
| Constructor Summary | |
|---|---|
SPF(DNSService dnsProbe,
Logger logger)
Uses passed logger and passed dnsServicer |
|
SPF(DNSService dnsProbe,
SPFRecordParser parser,
Logger logger,
MacroExpand macroExpand,
SPFExecutor executor)
Uses passed services |
|
| Method Summary | |
|---|---|
DNSLookupContinuation |
checkSPF(SPFSession spfData)
Run check for SPF with the given values. |
SPFResult |
checkSPF(String ipAddress,
String mailFrom,
String hostName)
Run check for SPF with the given values. |
FallbackPolicy |
getFallbackPolicy()
Return the FallbackPolicy object which can be used to provide default spfRecords for hosts which have no records |
OverridePolicy |
getOverridePolicy()
Return the OverridePolicy object which can be used to override spfRecords for hosts |
LinkedList<SPFChecker> |
getPolicies()
Return a default policy for SPF |
void |
setDefaultExplanation(String defaultExplanation)
Set the default explanation which will be used if no explanation is found in the SPF Record |
void |
setSPFMustEqualsTXT(boolean mustEquals)
Set to true if a PermError should returned when a domain publish a SPF-Type and TXT-Type SPF-Record and both are not equals. |
void |
setTimeOut(int timeOut)
Set the amount of time (in seconds) before an TermError is returned when the dnsserver not answer. |
void |
setUseBestGuess(boolean useBestGuess)
Set to true for using best guess. |
void |
setUseTrustedForwarder(boolean useTrustedForwarder)
Set to true to enable trusted-forwarder.org whitelist. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SPF(DNSService dnsProbe,
Logger logger)
dnsProbe - the dns providerlogger - the logger to use
public SPF(DNSService dnsProbe,
SPFRecordParser parser,
Logger logger,
MacroExpand macroExpand,
SPFExecutor executor)
dnsProbe - the dns providerparser - the parser to uselogger - the logger to use| Method Detail |
|---|
public SPFResult checkSPF(String ipAddress,
String mailFrom,
String hostName)
ipAddress - The ipAddress the connection is comming frommailFrom - The mailFrom which was providedhostName - The hostname which was provided as HELO/EHLO
public DNSLookupContinuation checkSPF(SPFSession spfData)
throws PermErrorException,
NoneException,
TempErrorException,
NeutralException
SPFChecker
checkSPF in interface SPFCheckerspfData - The SPF1Data which should be used to run the check
PermErrorException - Get thrown if an error was detected
NoneException - Get thrown if no Record was found
TempErrorException - Get thrown if a DNS problem was detected
NeutralException - Get thrown if the result should be neutralSPFChecker.checkSPF(org.apache.james.jspf.core.SPFSession)public LinkedList<SPFChecker> getPolicies()
public void setTimeOut(int timeOut)
timeOut - The timout in secondspublic void setDefaultExplanation(String defaultExplanation)
defaultExplanation - The explanation to use if no explanation is found in the SPF Recordpublic void setUseBestGuess(boolean useBestGuess)
useBestGuess - true to enable best guesspublic FallbackPolicy getFallbackPolicy()
public void setUseTrustedForwarder(boolean useTrustedForwarder)
useTrustedForwarder - true or falsepublic OverridePolicy getOverridePolicy()
public void setSPFMustEqualsTXT(boolean mustEquals)
mustEquals - true or false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||