--- qmail-smtpd.c-qregex	2002-10-26 01:15:58.000000000 -0400
+++ qmail-smtpd.c	2002-10-26 01:18:38.000000000 -0400
@@ -86,6 +86,8 @@
 char *remoteinfo;
 char *local;
 char *relayclient;
+char *bmffile;
+char *bmtfile;
 
 stralloc helohost = {0};
 char *fakehelo; /* pointer into helohost, or 0 */
@@ -122,11 +124,17 @@
 
   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 (!constmap_init(&mapbmf,bmf.s,bmf.len,0)) die_nomem();
 
-  bmtok = control_readfile(&bmt,"control/badmailto",0);
+  bmtfile = env_get("BADMAILTO");
+  if (!bmtfile) bmtfile = "control/badmailto";
+  
+  bmtok = control_readfile(&bmt,bmtfile,0);
   if (bmtok == -1) die_control();
   if (!constmap_init(&mapbmt,bmt.s,bmt.len,0)) die_nomem();
  
