--- qmail-smtpd.c-orig	2002-10-26 00:58:35.000000000 -0400
+++ qmail-smtpd.c	2002-10-26 00:57:28.000000000 -0400
@@ -81,6 +81,7 @@
 char *remoteinfo;
 char *local;
 char *relayclient;
+char *bmffile;
 
 stralloc helohost = {0};
 char *fakehelo; /* pointer into helohost, or 0 */
@@ -101,7 +102,7 @@
 {
   char *x;
   unsigned long u;
- 
+  
   if (control_init() == -1) die_control();
   if (control_rldef(&greeting,"control/smtpgreeting",1,(char *) 0) != 1)
     die_control();
@@ -112,7 +113,10 @@
 
   if (rcpthosts_init() == -1) die_control();
 
-  bmfok = control_readfile(&bmf,"control/badmailfrom",0);
+  bmffile = env_get("BADMAILFROM");
+  if (!bmffile) bmffile = "control/badmailfrom";
+
+  bmfok = control_readfile(&bmf,bmffile,0);
   if (bmfok == -1) die_control();
   if (bmfok)
     if (!constmap_init(&mapbmf,bmf.s,bmf.len,0)) die_nomem();

