You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2006/09/09 10:22:58 UTC
svn commit: r441760 - in /james/server/trunk/src:
conf/james-smtphandlerchain.xml
java/org/apache/james/smtpserver/core/filter/fastfail/URIRBLHandler.java
Author: norman
Date: Sat Sep 9 01:22:57 2006
New Revision: 441760
URL: http://svn.apache.org/viewvc?view=rev&rev=441760
Log:
Add config example
Fix getDetails
Modified:
james/server/trunk/src/conf/james-smtphandlerchain.xml
james/server/trunk/src/java/org/apache/james/smtpserver/core/filter/fastfail/URIRBLHandler.java
Modified: james/server/trunk/src/conf/james-smtphandlerchain.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/src/conf/james-smtphandlerchain.xml?view=diff&rev=441760&r1=441759&r2=441760
==============================================================================
--- james/server/trunk/src/conf/james-smtphandlerchain.xml (original)
+++ james/server/trunk/src/conf/james-smtphandlerchain.xml Sat Sep 9 01:22:57 2006
@@ -174,6 +174,31 @@
<!-- The message handler configuration -->
+ <!-- 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. -->
+ <!--
+ <handler class="org.apache.james.smtpserver.core.filter.fastfail.SpamAssassinHandler">
+ <spamdHost> 127.0.0.1 </spamdHost>
+ <spamdPort> 783 </spamdPort>
+ <spamdRejectionHits> 10 </spamdRejectionHits>
+ <checkAuthNetworks> false </checkAuthNetworksv>
+ </handler>
+ -->
+
+ <!-- This MessageHandler could be used to extract domain out of the message and check -->
+ <!-- this domains against uriRbllists. See http://www.surbl.org for more informations. -->
+ <!-- The message get rejected if a domain matched . -->
+ <!--
+ <handler class="org.apache.james.smtpserver.core.filter.fastfail.URIRBLHandler">
+ <uriRblServers>
+ <server> multi.surbl.org</server>
+ </uriRblServers>
+ <getDetail> true </getDetail>
+ <checkAuthNetworks> false </checkAuthNetworks>
+ </handler>
+ -->
+
<!--
<handler class="org.apache.james.smtpserver.core.SetMimeHeaderHandler">
<headername>SPF-test</headername>
Modified: james/server/trunk/src/java/org/apache/james/smtpserver/core/filter/fastfail/URIRBLHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/smtpserver/core/filter/fastfail/URIRBLHandler.java?view=diff&rev=441760&r1=441759&r2=441760
==============================================================================
--- james/server/trunk/src/java/org/apache/james/smtpserver/core/filter/fastfail/URIRBLHandler.java (original)
+++ james/server/trunk/src/java/org/apache/james/smtpserver/core/filter/fastfail/URIRBLHandler.java Sat Sep 9 01:22:57 2006
@@ -49,7 +49,7 @@
import org.apache.james.util.urirbl.URIScanner;
/**
- * Extract domains from message and check against URIRBLServer
+ * Extract domains from message and check against URIRBLServer. For more informations see http://www.surbl.org
*/
public class URIRBLHandler extends AbstractLogEnabled implements MessageHandler,
Serviceable, Configurable {
@@ -187,7 +187,7 @@
// we should try to retrieve details
if (getDetail) {
- Collection txt = dnsServer.findTXTRecords(target + "." + uRbl.next());
+ Collection txt = dnsServer.findTXTRecords(target + "." + uRblServer);
// Check if we found a txt record
if (!txt.isEmpty()) {
@@ -198,15 +198,14 @@
}
if (detail != null) {
- responseString = "530 "
- + DSNStatus.getStatus(DSNStatus.PERMANENT, DSNStatus.SECURITY_AUTH) + " "
+
+ responseString = "554 "
+ + DSNStatus.getStatus(DSNStatus.PERMANENT, DSNStatus.SECURITY_OTHER) + " "
+ detail;
} else {
- responseString = "530 "
- + DSNStatus.getStatus(DSNStatus.PERMANENT, DSNStatus.SECURITY_AUTH)
- + " Rejected: unauthenticated e-mail from "
- + session.getRemoteIPAddress()
- + " is restricted. Contact the postmaster for details.";
+ responseString = "554 "
+ + DSNStatus.getStatus(DSNStatus.PERMANENT, DSNStatus.SECURITY_OTHER)
+ + " Rejected: message contains a domain listed by " + uRblServer;
}
session.writeResponse(responseString);
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org