public class AMechanism extends GenericMechanism implements SPFCheckerDNSResponseListener
| Modifier and Type | Field and Description |
|---|---|
static String |
REGEX
ABNF: A = "a" [ ":" domain-spec ] [ dual-cidr-length ]
|
DUAL_CIDR_LENGTH_REGEX, IP4_CIDR_LENGTH_REGEX, IP6_CIDR_LENGTH_REGEX, log, macroExpand| Constructor and Description |
|---|
AMechanism() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkAddressList(IPAddr checkAddress,
List<String> addressList,
int cidr)
Check if the given ipaddress array contains the provided ip.
|
DNSLookupContinuation |
checkSPF(SPFSession spfData)
Run check for SPF with the given values.
|
void |
config(Configuration params)
Configuration
|
List<String> |
getAAAARecords(String strServer)
Retrieve a list of AAAA records
|
List<String> |
getARecords(String strServer)
Get a list of IPAddr's for a server
|
protected int |
getIp4cidr() |
protected int |
getIp6cidr() |
DNSLookupContinuation |
onDNSResponse(DNSResponse response,
SPFSession spfSession)
Continue the check for SPF with the given values and the given DNSResponse
|
String |
toString() |
protected String |
toString(String mechKey) |
enableLogging, enableMacroExpand, expandHost, getDomainpublic static final String REGEX
public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException, TempErrorException, NeutralException, NoneException
SPFCheckercheckSPF in interface SPFCheckerspfData - The SPF1Data which should be used to run the checkPermErrorException - 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 foundSPFChecker.checkSPF(org.apache.james.jspf.core.SPFSession)public void config(Configuration params) throws PermErrorException
ConfigurationEnabledconfig in interface ConfigurationEnabledconfig in class GenericMechanismparams - the ConfigurationMatch which should usedPermErrorException - get thrown if a PermError should returnedGenericMechanism.config(Configuration)public boolean checkAddressList(IPAddr checkAddress, List<String> addressList, int cidr) throws PermErrorException
checkAddress - The ip wich should be contained in the given ArrayListaddressList - The ip ArrayList.PermErrorExceptionprotected int getIp4cidr()
protected int getIp6cidr()
public String toString()
toString in class ObjectObject.toString()protected String toString(String mechKey)
Object.toString()public List<String> getARecords(String strServer)
strServer - The hostname or ipAddress whe should get the A-Records forpublic DNSLookupContinuation onDNSResponse(DNSResponse response, SPFSession spfSession) throws PermErrorException, TempErrorException, NoneException, NeutralException
SPFCheckerDNSResponseListeneronDNSResponse in interface SPFCheckerDNSResponseListenerresponse - The DNSResponse which should be used to run the checkspfSession - The SPFSession which should be used to run the checkPermErrorException - Get thrown if an error was detectedTempErrorException - Get thrown if a DNS problem was detectedNoneException - Get thrown if no Record was foundNeutralException - Get thrown if the result should be neutralSPFCheckerDNSResponseListener.onDNSResponse(org.apache.james.jspf.core.DNSResponse, org.apache.james.jspf.core.SPFSession)Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.