Class FallbackPolicy
java.lang.Object
org.apache.james.jspf.policies.local.FallbackPolicy
- All Implemented Interfaces:
PolicyPostFilter
- Direct Known Subclasses:
OverridePolicy
Class to support Fallback feature
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a entry.voidClear all entriesprotected SPF1RecordgetMySPFRecord(String host) Return the SPF1Record for the given hostgetSPFRecord(String currentDomain, SPF1Record res) Filter or replace a record for the given domainvoidremoveEntry(String host) Remove entry
-
Constructor Details
-
FallbackPolicy
-
-
Method Details
-
addEntry
Add a entry.- Parameters:
rawHost- the host or ipaddress for which the entry should be added.rawSpfRecord- the spfRecord to add- Throws:
IllegalArgumentException- get thrown on invalid spfRecord
-
clearEntrys
public void clearEntrys()Clear all entries -
removeEntry
Remove entry- Parameters:
host- The host
-
getSPFRecord
public SPF1Record getSPFRecord(String currentDomain, SPF1Record res) throws PermErrorException, TempErrorException, NoneException, NeutralException Description copied from interface:PolicyPostFilterFilter or replace a record for the given domain- Specified by:
getSPFRecordin interfacePolicyPostFilter- Parameters:
currentDomain- the domain to retrieve the SPFRecord forres- the previous record- Returns:
- the SPFRecord found
- Throws:
PermErrorException- exceptionTempErrorException- exceptionNoneException- exceptionNeutralException- exception- See Also:
-
getMySPFRecord
Return the SPF1Record for the given host- Parameters:
host- the hostname or ipaddress- Returns:
- the SPF1Record of null if no SPF1Record was found in fallback for the given host
-