diff -ur qmail-1.03/qmail-control.9 qmail-1.03-barelfdelay/qmail-control.9 --- qmail-1.03/qmail-control.9 Mon Jun 15 12:53:16 1998 +++ qmail-1.03-barelfdelay/qmail-control.9 Fri Sep 7 11:57:01 2001 @@ -41,6 +41,7 @@ control default used by .I badmailfrom \fR(none) \fRqmail-smtpd +.I barelfdelay \fR0 \fRqmail-smtpd .I bouncefrom \fRMAILER-DAEMON \fRqmail-send .I bouncehost \fIme \fRqmail-send .I concurrencylocal \fR10 \fRqmail-send diff -ur qmail-1.03/qmail-showctl.c qmail-1.03-barelfdelay/qmail-showctl.c --- qmail-1.03/qmail-showctl.c Mon Jun 15 12:53:16 1998 +++ qmail-1.03-barelfdelay/qmail-showctl.c Fri Sep 7 13:02:18 2001 @@ -215,6 +215,7 @@ } do_lst("badmailfrom","Any MAIL FROM is allowed.",""," not accepted in MAIL FROM."); + do_int("barelfdelay","0","bare LF delay is "," seconds"); do_str("bouncefrom",0,"MAILER-DAEMON","Bounce user name is "); do_str("bouncehost",1,"bouncehost","Bounce host name is "); do_int("concurrencylocal","10","Local concurrency is ",""); @@ -268,6 +269,7 @@ if (str_equal(d->d_name,"bouncefrom")) continue; if (str_equal(d->d_name,"bouncehost")) continue; if (str_equal(d->d_name,"badmailfrom")) continue; + if (str_equal(d->d_name,"barelfdelay")) continue; if (str_equal(d->d_name,"bouncefrom")) continue; if (str_equal(d->d_name,"bouncehost")) continue; if (str_equal(d->d_name,"concurrencylocal")) continue; diff -ur qmail-1.03/qmail-smtpd.8 qmail-1.03-barelfdelay/qmail-smtpd.8 --- qmail-1.03/qmail-smtpd.8 Mon Jun 15 12:53:16 1998 +++ qmail-1.03-barelfdelay/qmail-smtpd.8 Fri Sep 7 12:03:56 2001 @@ -50,6 +50,12 @@ meaning every address at .IR host . .TP 5 +.I barelfdelay +Number of seconds +.B qmail-smtpd +will sleep before returning the 451 smtplf error. +Default: 0. +.TP 5 .I databytes Maximum number of bytes allowed in a message, or 0 for no limit. diff -ur qmail-1.03/qmail-smtpd.c qmail-1.03-barelfdelay/qmail-smtpd.c --- qmail-1.03/qmail-smtpd.c Mon Jun 15 12:53:16 1998 +++ qmail-1.03-barelfdelay/qmail-smtpd.c Fri Sep 7 11:25:26 2001 @@ -27,6 +27,7 @@ #define MAXHOPS 100 unsigned int databytes = 0; int timeout = 1200; +int barelfdelay = 0; int safewrite(fd,buf,len) int fd; char *buf; int len; { @@ -47,7 +48,7 @@ void die_nomem() { out("421 out of memory (#4.3.0)\r\n"); flush(); _exit(1); } void die_control() { out("421 unable to read controls (#4.3.0)\r\n"); flush(); _exit(1); } void die_ipme() { out("421 unable to figure out my IP addresses (#4.3.0)\r\n"); flush(); _exit(1); } -void straynewline() { out("451 See http://pobox.com/~djb/docs/smtplf.html.\r\n"); flush(); _exit(1); } +void straynewline() { sleep(barelfdelay); out("451 See http://pobox.com/~djb/docs/smtplf.html.\r\n"); flush(); _exit(1); } 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"); } @@ -109,6 +110,8 @@ if (liphostok == -1) die_control(); if (control_readint(&timeout,"control/timeoutsmtpd") == -1) die_control(); if (timeout <= 0) timeout = 1; + if (control_readint(&barelfdelay,"control/barelfdelay") == -1) die_control(); + if (barelfdelay < 0) barelfdelay = 1; if (rcpthosts_init() == -1) die_control();