@Override public HookResult doMail(SMTPSession session, MailAddress sender) { doSPFCheck(session, sender); return HookResult.DECLINED; }
@Override public void init(Configuration config) throws ConfigurationException { int maxUnknown = config.getInt("maxUnknownCmdCount", DEFAULT_MAX_UNKOWN); setMaxUnknownCmdCount(maxUnknown); }
@Override public void init(Configuration config) throws ConfigurationException { setBlockSoftFail(config.getBoolean("blockSoftFail", false)); setBlockPermError(config.getBoolean("blockPermError", true)); }
@Override public void init(Configuration config) throws ConfigurationException { setSpamdHost(config.getString("spamdHost", "localhost")); setSpamdPort(config.getInt("spamdPort", 783)); setSpamdRejectionHits(config.getDouble("spamdRejectionHits", 0.0)); }
/** * DNSService to use * * @param dnsService The DNSService */ public void setDNSService(DNSService dnsService) { spf = new SPF(dnsService, new SPFLogger()); }
/** * Setup the autowhitelist lifetime for which we should whitelist a triplet. * After this lifetime the record will be deleted * * @param autoWhiteListLifeTime * The lifeTime */ public void setAutoWhiteListLifeTime(String autoWhiteListLifeTime) { setAutoWhiteListLifeTime(TimeConverter.getMilliSeconds(autoWhiteListLifeTime)); }
/** * Set up the liftime of only once seen triplet. After this liftime the * record will be deleted * * @param unseenLifeTime * The lifetime */ public void setUnseenLifeTime(String unseenLifeTime) { setUnseenLifeTime(TimeConverter.getMilliSeconds(unseenLifeTime)); }
@Override public void init(Configuration config) throws ConfigurationException { int maxRcpt = config.getInt("maxRcpt", 0); setMaxRcpt(maxRcpt); }
/** * Setup the temporary blocking time * * @param tempBlockTime * The temporary blocking time */ public void setTempBlockTime(String tempBlockTime) { setTempBlockTime(TimeConverter.getMilliSeconds(tempBlockTime)); }
public void configure(HierarchicalConfiguration handlerConfiguration) throws ConfigurationException { int tarpitRcptCount = handlerConfiguration.getInt("tarpitRcptCount", 0); long tarpitSleepTime = handlerConfiguration.getLong("tarpitSleepTime", 5000); if (tarpitRcptCount == 0) throw new ConfigurationException( "Please set the tarpitRcptCount bigger values as 0"); if (tarpitSleepTime == 0) throw new ConfigurationException( "Please set the tarpitSleepTimeto a bigger values as 0"); setTarpitRcptCount(tarpitRcptCount); setTarpitSleepTime(tarpitSleepTime); } }
@Override public void init(Configuration config) throws ConfigurationException { setSupportsRecipientRewriteTable(config.getBoolean("enableRecipientRewriteTable", true)); }
/** * @see org.apache.james.lifecycle.Configurable#configure(org.apache.commons.configuration.Configuration) */ public void configure(HierarchicalConfiguration config) throws ConfigurationException { setVirtualUserTableSupport(config.getBoolean("enableVirtualUserTable", true)); }
public void configure(HierarchicalConfiguration config) throws ConfigurationException { setSpamdHost(config.getString("spamdHost","localhost")); setSpamdPort(config.getInt("spamdPort",783)); setSpamdRejectionHits(config.getDouble("spamdRejectionHits", 0.0)); }
public void configure(HierarchicalConfiguration handlerConfiguration) throws ConfigurationException { setBlockSoftFail(handlerConfiguration.getBoolean( "blockSoftFail", false)); setBlockPermError(handlerConfiguration.getBoolean("blockPermError", true)); }
/** * @see org.apache.james.protocols.smtp.hook.MailHook#doMail(org.apache.james.protocols.smtp.SMTPSession, org.apache.mailet.MailAddress) */ public HookResult doMail(SMTPSession session, MailAddress sender) { doSPFCheck(session,sender); return new HookResult(HookReturnCode.DECLINED); }
/** * DNSService to use * * @param dnsService * The DNSService */ @Inject public void setDNSService(DNSService dnsService) { spf = new SPF(dnsService, new SPFLogger(serviceLog)); }
/** * Setup the autowhitelist lifetime for which we should whitelist a triplet. * After this lifetime the record will be deleted * * @param autoWhiteListLifeTime * The lifeTime */ public void setAutoWhiteListLifeTime(String autoWhiteListLifeTime) { setAutoWhiteListLifeTime(TimeConverter.getMilliSeconds(autoWhiteListLifeTime)); }
/** * Set up the liftime of only once seen triplet. After this liftime the * record will be deleted * * @param unseenLifeTime * The lifetime */ public void setUnseenLifeTime(String unseenLifeTime) { setUnseenLifeTime(TimeConverter.getMilliSeconds(unseenLifeTime)); }
public void configure(HierarchicalConfiguration handlerConfiguration) throws ConfigurationException { int maxRcpt = handlerConfiguration.getInt("maxRcpt", 0); setMaxRcpt(maxRcpt); } }
/** * Setup the temporary blocking time * * @param tempBlockTime * The temporary blocking time */ public void setTempBlockTime(String tempBlockTime) { setTempBlockTime(TimeConverter.getMilliSeconds(tempBlockTime)); }