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 2003/09/24 23:11:26 UTC
cvs commit: james-server/src/java/org/apache/james/transport/matchers SenderInFakeDomain.java
noel 2003/09/24 14:11:26
Modified: src/java/org/apache/james/transport/matchers Tag:
branch_2_1_fcs SenderInFakeDomain.java
Log:
Allow specifying networks to be considered bad. Undocumented, since this may not be the *best* way, but available
Revision Changes Path
No revision
No revision
1.5.4.3 +23 -3 james-server/src/java/org/apache/james/transport/matchers/SenderInFakeDomain.java
Index: SenderInFakeDomain.java
===================================================================
RCS file: /home/cvs/james-server/src/java/org/apache/james/transport/matchers/SenderInFakeDomain.java,v
retrieving revision 1.5.4.2
retrieving revision 1.5.4.3
diff -u -r1.5.4.2 -r1.5.4.3
--- SenderInFakeDomain.java 8 Mar 2003 21:54:09 -0000 1.5.4.2
+++ SenderInFakeDomain.java 24 Sep 2003 21:11:26 -0000 1.5.4.3
@@ -68,9 +68,8 @@
* there are no entries, the domain is considered fake and the match is
* successful.
*
- * @author Serge Knystautas <se...@lokitech.com>
*/
-public class SenderInFakeDomain extends GenericMatcher {
+public class SenderInFakeDomain extends AbstractNetworkMatcher {
public Collection match(Mail mail) {
if (mail.getSender() == null) {
@@ -83,8 +82,29 @@
//No records...could not deliver to this domain, so matches criteria.
log("No MX, A, or CNAME record found for domain: " + domain);
return mail.getRecipients();
+ } else if (matchNetwork(servers.iterator().next().toString())){
+ /*
+ * It could be a wildcard address like these:
+ *
+ * 64.55.105.9/32 # Allegiance Telecom Companies Worldwide (.nu)
+ * 64.94.110.11/32 # VeriSign (.com .net)
+ * 194.205.62.122/32 # Network Information Center - Ascension Island (.ac)
+ * 194.205.62.62/32 # Internet Computer Bureau (.sh)
+ * 195.7.77.20/32 # Fredrik Reutersward Data (.museum)
+ * 206.253.214.102/32 # Internap Network Services (.cc)
+ * 212.181.91.6/32 # .NU Domain Ltd. (.nu)
+ * 219.88.106.80/32 # Telecom Online Solutions (.cx)
+ * 194.205.62.42/32 # Internet Computer Bureau (.tm)
+ * 216.35.187.246/32 # Cable & Wireless (.ws)
+ * 203.119.4.6/32 # .PH TLD (.ph)
+ *
+ */
+ log("Banned IP found for domain: " + domain);
+ log(" --> :" + servers.iterator().next().toString());
+ return mail.getRecipients();
} else {
- //Some servers were found... the domain is not fake.
+ // Some servers were found... the domain is not fake.
+
return null;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org