diff -ruN qmailadmin-1.2.12-factory/qmailadmin.c qmailadmin-1.2.12-work/qmailadmin.c
--- qmailadmin-1.2.12-factory/qmailadmin.c	2007-09-21 19:27:39.000000000 -0400
+++ qmailadmin-1.2.12-work/qmailadmin.c	2009-03-13 08:25:52.000000000 -0400
@@ -200,7 +200,12 @@
         chdir(RealDir);
         load_limits();
 
-        pw = vauth_user( User, Domain, Password, "" );
+        set_admin_type() ;
+        if ( AdminType == DOMAIN_ADMIN && getenv("QMAILADMIN_DENY_ADMIN") )
+          pw = NULL ;
+        else
+          pw = vauth_user( User, Domain, Password, "" );
+
         if ( pw == NULL ) {
           snprintf (StatusMessage, sizeof(StatusMessage), "%s", html_text[198]);
         } else if (pw->pw_flags & NO_PASSWD_CHNG) {
@@ -248,7 +253,12 @@
          chdir(RealDir);
          load_limits();
 
-         pw = vauth_user( Username, Domain, Password, "" );
+         set_admin_type() ;
+         if ( AdminType == DOMAIN_ADMIN && getenv("QMAILADMIN_DENY_ADMIN") )
+           pw = NULL ;
+         else
+           pw = vauth_user( Username, Domain, Password, "" );
+
          if ( pw == NULL ) { 
            snprintf (StatusMessage, sizeof(StatusMessage), "%s\n", html_text[198]);
            show_login();
