Methods Summary |
---|
public java.lang.String | getAuthorizedAddresses()
return m_authorizedAddresses;
|
public int | getMaxMessageSize()
return m_maxMessageSizeKB;
|
public void | init()
setAttribute("enabled", true);
addChild(Util.getValuedConfiguration("port", "" + m_smtpListenerPort));
if (m_connectionLimit != null) addChild(Util.getValuedConfiguration("connectionLimit", "" + m_connectionLimit.intValue()));
if (m_connectionBacklog != null) addChild(Util.getValuedConfiguration("connectionBacklog", "" + m_connectionBacklog.intValue()));
DefaultConfiguration handlerConfig = new DefaultConfiguration("handler");
handlerConfig.addChild(Util.getValuedConfiguration("helloName", "myMailServer"));
handlerConfig.addChild(Util.getValuedConfiguration("connectiontimeout", "360000"));
handlerConfig.addChild(Util.getValuedConfiguration("authorizedAddresses", m_authorizedAddresses));
handlerConfig.addChild(Util.getValuedConfiguration("maxmessagesize", "" + m_maxMessageSizeKB));
handlerConfig.addChild(Util.getValuedConfiguration("authRequired", m_authorizingMode));
handlerConfig.addChild(Util.getValuedConfiguration("heloEhloEnforcement", m_heloEhloEnforcement+""));
if (m_verifyIdentity) handlerConfig.addChild(Util.getValuedConfiguration("verifyIdentity", "" + m_verifyIdentity));
handlerConfig.addChild(Util.createSMTPHandlerChainConfiguration());
// Add Configuration for Helo checks and Ehlo checks
Configuration[] heloConfig = handlerConfig.getChild("handlerchain").getChildren("handler");
for (int i = 0; i < heloConfig.length; i++) {
if (heloConfig[i] instanceof DefaultConfiguration) {
String cmd = ((DefaultConfiguration) heloConfig[i]).getAttribute("command",null);
if (cmd != null) {
if ("HELO".equals(cmd)) {
((DefaultConfiguration) heloConfig[i]).addChild(Util.getValuedConfiguration("checkResolvableHelo",m_heloResolv+""));
((DefaultConfiguration) heloConfig[i]).addChild(Util.getValuedConfiguration("checkReverseEqualsHelo",m_reverseEqualsHelo+""));
((DefaultConfiguration) heloConfig[i]).addChild(Util.getValuedConfiguration("checkAuthNetworks",m_checkAuthNetworks+""));
} else if ("EHLO".equals(cmd)) {
((DefaultConfiguration) heloConfig[i]).addChild(Util.getValuedConfiguration("checkResolvableEhlo",m_ehloResolv+""));
((DefaultConfiguration) heloConfig[i]).addChild(Util.getValuedConfiguration("checkReverseEqualsEhlo",m_reverseEqualsEhlo+""));
((DefaultConfiguration) heloConfig[i]).addChild(Util.getValuedConfiguration("checkAuthNetworks",m_checkAuthNetworks+""));
} else if ("MAIL".equals(cmd)) {
((DefaultConfiguration) heloConfig[i]).addChild(Util.getValuedConfiguration("checkValidSenderDomain",m_senderDomainResolv+""));
((DefaultConfiguration) heloConfig[i]).addChild(Util.getValuedConfiguration("checkAuthClients",m_checkAuthClients+""));
} else if ("RCPT".equals(cmd)) {
((DefaultConfiguration) heloConfig[i]).addChild(Util.getValuedConfiguration("maxRcpt",m_maxRcpt+""));
}
}
}
}
addChild(handlerConfig);
|
public void | setAuthorizedAddresses(java.lang.String authorizedAddresses)
m_authorizedAddresses = authorizedAddresses;
|
public void | setAuthorizingAnnounce()
m_authorizingMode = "announce";
m_verifyIdentity = true;
|
public void | setAuthorizingNotRequired()
m_authorizingMode = "false";
m_verifyIdentity = false;
|
public void | setAuthorizingRequired()
m_authorizingMode = "true";
m_verifyIdentity = true;
|
public void | setCheckAuthClients(boolean ignore)
m_checkAuthClients = ignore;
|
public void | setCheckAuthNetworks(boolean checkAuth)
m_checkAuthNetworks = checkAuth;
|
public void | setConnectionBacklog(int iConnectionBacklog)
m_connectionBacklog = new Integer(iConnectionBacklog);
|
public void | setConnectionLimit(int iConnectionLimit)
m_connectionLimit = new Integer(iConnectionLimit);
|
public void | setEhloResolv()
m_ehloResolv = true;
|
public void | setHeloEhloEnforcement(boolean heloEhloEnforcement)
m_heloEhloEnforcement = heloEhloEnforcement;
|
public void | setHeloResolv()
m_heloResolv = true;
|
public void | setMaxMessageSize(int kilobytes)
m_maxMessageSizeKB = kilobytes;
|
public void | setMaxRcpt(int maxRcpt)
m_maxRcpt = maxRcpt;
|
public void | setReverseEqualsEhlo()
m_reverseEqualsEhlo = true;
|
public void | setReverseEqualsHelo()
m_reverseEqualsHelo = true;
|
public void | setSenderDomainResolv()
m_senderDomainResolv = true;
|