|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.james.smtpserver.core.filter.fastfail.SpamAssassinHandler
public class SpamAssassinHandler
This MessageHandler could be used to check message against spamd before
accept the email. So its possible to reject a message on smtplevel if a
configured hits amount is reached. The handler add the follow attributes to
the mail object:
org.apache.james.spamassassin.status - Holds the status
org.apache.james.spamassassin.flag - Holds the flag
Sample Configuration:
<handler class="org.apache.james.smtpserver.SpamAssassinHandler">
<spamdHost>localhost</spamdHost>
<spamdPort>783</spamdPort>
<spamdRejectionHits>15.0</spamdRejectionHits>
<checkAuthNetworks>false</checkAuthNetworks> </handler>
| Constructor Summary | |
|---|---|
SpamAssassinHandler()
|
|
| Method Summary | |
|---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration arg0)
|
void |
onMessage(SMTPSession session)
|
void |
setCheckAuthNetworks(boolean checkAuthNetworks)
Set to true if AuthNetworks should be included in the EHLO check |
void |
setSpamdHost(java.lang.String spamdHost)
Set the host the spamd daemon is running at |
void |
setSpamdPort(int spamdPort)
Set the port the spamd damon is listen on |
void |
setSpamdRejectionHits(double spamdRejectionHits)
Set the hits on which the message will be rejected. |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpamAssassinHandler()
| Method Detail |
|---|
public void configure(org.apache.avalon.framework.configuration.Configuration arg0)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableorg.apache.avalon.framework.configuration.ConfigurationExceptionConfigurable.configure(Configuration)public void setCheckAuthNetworks(boolean checkAuthNetworks)
checkAuthNetworks - Set to true to enablepublic void setSpamdHost(java.lang.String spamdHost)
spamdHost - The spamdHostpublic void setSpamdPort(int spamdPort)
spamdPort - the spamdPortpublic void setSpamdRejectionHits(double spamdRejectionHits)
spamdRejectionHits - The hitspublic void onMessage(SMTPSession session)
onMessage in interface MessageHandlerMessageHandler.onMessage(SMTPSession)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||