public class FallbackPolicy extends Object implements PolicyPostFilter
Constructor and Description |
---|
FallbackPolicy(Logger log,
SPFRecordParser parser) |
Modifier and Type | Method and Description |
---|---|
void |
addEntry(String rawHost,
String rawSpfRecord)
Add a entry.
|
void |
clearEntrys()
Clear all entries
|
protected SPF1Record |
getMySPFRecord(String host)
Return the SPF1Record for the given host
|
SPF1Record |
getSPFRecord(String currentDomain,
SPF1Record res)
Filter or replace a record for the given domain
|
void |
removeEntry(String host)
Remove entry
|
public FallbackPolicy(Logger log, SPFRecordParser parser)
public void addEntry(String rawHost, String rawSpfRecord) throws IllegalArgumentException
rawHost
- the host or ipaddress for which the entry should be added.rawSpfRecord
- the spfRecord to addIllegalArgumentException
- get thrown on invalid spfRecordpublic void clearEntrys()
public void removeEntry(String host)
host
- The hostpublic SPF1Record getSPFRecord(String currentDomain, SPF1Record res) throws PermErrorException, TempErrorException, NoneException, NeutralException
PolicyPostFilter
getSPFRecord
in interface PolicyPostFilter
currentDomain
- the domain to retrieve the SPFRecord forres
- the previous recordPermErrorException
- exceptionTempErrorException
- exceptionNoneException
- exceptionNeutralException
- exceptionPolicyPostFilter.getSPFRecord(java.lang.String, org.apache.james.jspf.core.SPF1Record)
protected SPF1Record getMySPFRecord(String host)
host
- the hostname or ipaddressCopyright © 2006–2016 The Apache Software Foundation. All rights reserved.