Claudio,

I have patched qmail-smtpd.c to include the IP address of the culprit in
the error message.  It has cut down on escalations from our support team
greatly as well as their time spent researching RBL problems.

The patch may be an ugly hack, but it works by changing about three
lines of code.  It would be great if the main qmail-ldap patch included
this or something like it.

The SMTP error response looks something like this:

553 sorry, your mailserver [1.1.1.1] is rejected by
http://www.spamhaus.org/xbl for having a compromized proxy.

--- qmail-smtpd.c.ldap	Thu Mar  4 12:03:34 2004
+++ qmail-smtpd.c	Thu Mar  4 12:09:59 2004
@@ -166,7 +166,8 @@
 void err_noop(char *arg) { out("250 ok\r\n"); logline(3,"'noop'"); }
 void err_vrfy(char *arg) { out("252 send some mail, i'll try my best\r\n"); logpid(3); logstring(3,"vrfy for: "); logstring(3,arg); logflush(3); }
 
-void err_rbl(char *arg) { out("553 sorry, your mailserver is rejected by "); out(arg); out("\r\n"); }
+const char *remoteip;
+void err_rbl(char *arg) { out("553 sorry, your mailserver ["); out(remoteip); out("] is rejected by "); out(arg); out("\r\n"); }
 void err_deny(void) { out("553 sorry, mail from your location is administratively denied (#5.7.1)\r\n"); }
 void err_badrcptto(void) { out("553 sorry, mail to that recipient is not accepted (#5.7.1)\r\n"); }
 void err_554msg(const char *arg)
@@ -224,7 +225,6 @@
   _exit(0);
 }
 
-const char *remoteip;
 const char *remotehost;
 const char *remoteinfo;
 const char *local;

Reply via email to