Hi!
As ucspi-tcp has no mailing list of its own this goes to the qmail list.
I wrote a little patch to rblsmtpd to have an additional message in the
SMTP reply to be able to inform the sender of a blocked email about
alternatives etc.
It reads a string from the environment variable RBLMESSAGE and puts it
right after the SMTP error code and before the message from the DNSBL.
We are using it like this:
In /etc/tcp.smtp tcprules file for qmail-smtpd:
:allow,RBLMESSAGE="Please forward this message to <postmaster@epigenomics.com>:
"
A sender that was rejected in error then sees the alternative address
and is able to forward his request to us.
diff -ruN ucspi-tcp-src/ucspi-tcp-0.88/rblsmtpd.c
ucspi-tcp-src-epi/ucspi-tcp-0.88/rblsmtpd.c
--- ucspi-tcp-src/ucspi-tcp-0.88/rblsmtpd.c 2000-03-18
16:18:42.000000000 +0100
+++ ucspi-tcp-src-epi/ucspi-tcp-0.88/rblsmtpd.c 2007-04-04
13:27:40.400780000 +0200
@@ -118,18 +118,26 @@
void rblsmtpd(void)
{
int i;
+ char *x;
+ x = env_get("RBLMESSAGE");
+
if (flagmustnotbounce || (decision == 2)) {
if (!stralloc_copys(&message,"451 ")) nomem();
}
else
if (!stralloc_copys(&message,"553 ")) nomem();
+ if (x && *x)
+ if (!stralloc_cats(&message, x))
+ nomem();
+
if (text.len > 200) text.len = 200;
if (!stralloc_cat(&message,&text)) nomem();
for (i = 0;i < message.len;++i)
if ((message.s[i] < 32) || (message.s[i] > 126))
message.s[i] = '?';
+
buffer_puts(buffer_2,"rblsmtpd: ");
buffer_puts(buffer_2,ip_env);
Use at your own risk.
Greetings
--
Robert Sander Senior Manager Information Systems
Epigenomics AG Kleine Praesidentenstr. 1 10178 Berlin, Germany
phone:+49-30-24345-0 fax:+49-30-24345-555
http://www.epigenomics.com robert.sander@epigenomics.com
|