I forgot to mention: It doesn't check for abuse@, only postmaster@ and
the email address used in the error message is hard coded.
Hontvari Jozsef wrote:
Maybe it helps, I have attached the source which we use for about a
year. I cannot create a standard patch because my last workspace is
based on the now non-existent cvs repository.
The code must be inserted before these lines into the SMTPHandler.java
file:
if (authRequired) {
// Make sure the mail is being sent locally if not
// authenticated else reject.
Noel J. Bergman wrote:
Do to the incredibly high volume generated by Microsoft Windows
spambots, I
feel that we need to allow somewhat more aggressive measures in the near
term, as in *NOW*.
I propose an interm measure to add support for a DNSRBL in the SMTP
handler,
which will set a flag such that RCPT TO will fail except for postmaster
(RFC2821) and abuse (RFC2142). Once a single message to has been
accepted
for that connection, we might even terminate the connection.
This would not be a permanent measure, and would be replaced when we add
more flexible fast-fail, but it would provide relief today from the
spambots.
Thoughts?
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------
// black list check HJ
// don't check if the user is authenticated or if he is sending to
// postmaster
if (getUser() == null
&& !recipientAddress.getUser()
.equalsIgnoreCase("postmaster")) {
String host = remoteIP;
//Have to reverse the octets first
StringBuffer sb = new StringBuffer();
StringTokenizer st = new StringTokenizer(host, " .", false);
while (st.hasMoreTokens()) {
sb.insert(0, st.nextToken() + ".");
}
String reversedOctets = sb.toString();
String blackListMessage = null;
try {
//Try to look it up
InetAddress.getByName(
reversedOctets + "combined.njabl.org");
//If we got here, that's bad... it means the host
// was found in the blacklist
//blackListMessage = "Dynamic/Residential IP range listed by
NJABL dynablock - http://njabl.org/dynablock.html";
blackListMessage = "combined.njabl.org BLACKLIST";
} catch (UnknownHostException uhe) {
//This is good... it's not on the list
}
if (blackListMessage != null) {
responseString = "550 Rejected: contact [EMAIL PROTECTED] for
details";
writeLoggedFlushedResponse(responseString);
getLogger().error("Message rejected - " + blackListMessage);
return;
}
try {
//Try to look it up
InetAddress.getByName(
reversedOctets + "sbl-xbl.spamhaus.org");
//If we got here, that's bad... it means the host
// was found in the blacklist
blackListMessage = "Spamhaus BLACKLIST";
} catch (UnknownHostException uhe) {
//This is good... it's not on the list
}
if (blackListMessage != null) {
responseString = "550 Rejected: contact [EMAIL PROTECTED] for
details";
writeLoggedFlushedResponse(responseString);
getLogger().error("Message rejected - " + blackListMessage);
return;
}
}
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]