Scott Schwartz writes:
> I got a bunch of them too, until I finally blocked relay1.pair.com
> (DATABYTES=1, since qmail-smtpd doesn't have a way to bounce a message
> cleanly.)
Cute. I like it. Only, the message the user gets back is confusing.
If you add the following four lines to qmail-smtpd, you can then put a
message into the RCPT TO: response by setting BOUNCEMAIL="553 Go Away".
-russ
diff -u qmail-1.03.orig/qmail-smtpd.c qmail-1.03/qmail-smtpd.c
--- qmail-1.03.orig/qmail-smtpd.c Mon Jun 15 05:53:16 1998
+++ qmail-1.03/qmail-smtpd.c Wed Jul 22 20:50:21 1998
@@ -51,6 +51,7 @@
void err_bmf() { out("553 sorry, your envelope sender is in my badmailfrom list
(#5.7.1)\r\n"); }
void err_nogateway() { out("553 sorry, that domain isn't in my list of allowed
rcpthosts (#5.7.1)\r\n"); }
+void err_maps(char *m) { out(m);out("\r\n"); }
void err_unimpl() { out("502 unimplemented (#5.5.1)\r\n"); }
void err_syntax() { out("555 syntax error (#5.5.4)\r\n"); }
void err_wantmail() { out("503 MAIL first (#5.5.1)\r\n"); }
@@ -81,6 +82,7 @@
char *remoteinfo;
char *local;
char *relayclient;
+char *bouncemail;
stralloc helohost = {0};
char *fakehelo; /* pointer into helohost, or 0 */
@@ -131,6 +133,7 @@
if (!remotehost) remotehost = "unknown";
remoteinfo = env_get("TCPREMOTEINFO");
relayclient = env_get("RELAYCLIENT");
+ bouncemail = env_get("BOUNCEMAIL");
dohelo(remotehost);
}
@@ -251,6 +254,7 @@
if (!seenmail) { err_wantmail(); return; }
if (!addrparse(arg)) { err_syntax(); return; }
if (flagbarf) { err_bmf(); return; }
+ if (bouncemail) { err_maps(bouncemail); return; }
if (relayclient) {
--addr.len;
if (!stralloc_cats(&addr,relayclient)) die_nomem();
--
-russ nelson <[EMAIL PROTECTED]> http://crynwr.com/~nelson
Crynwr supports Open Source(tm) Software| PGPok | There is good evidence
521 Pleasant Valley Rd. | +1 315 268 1925 voice | that freedom is the
Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | cause of world peace.