[[patches:vdominfo-5.4.26.realdomain.patch]]
 
--- vpopmail-5.4.26/vdominfo.c  2007-05-22 06:59:00.000000000 +0300
+++ vpopmail-5.4.26-patched/vdominfo.c  2008-10-06 17:16:05.000000000 +0300
@@ -38,6 +38,7 @@
 int DisplayDir;
 int DisplayAll;
 int DisplayTotalUsers;
+int DisplayRealDomain;
 
 void usage();
 void get_options(int argc, char **argv);
@@ -91,12 +92,13 @@
     DisplayGid = 0;
     DisplayDir = 0;
     DisplayTotalUsers = 0;
+    DisplayRealDomain = 0;
     DisplayAll = 1;
 
     memset(Domain, 0, sizeof(Domain));
 
     errflag = 0;
-    while( !errflag && (c=getopt(argc,argv,"vanugdt")) != -1 ) {
+    while( !errflag && (c=getopt(argc,argv,"vanugdtr")) != -1 ) {
         switch(c) {
             case 'v':
                 printf("version: %s\n", VERSION);
@@ -118,7 +120,11 @@
                 DisplayAll = 0;
                 break;
             case 't':
-                DisplayTotalUsers = 1;
+                DisplayTotalUsers = 1;
+                DisplayAll = 0;
+                break;
+            case 'r':
+                DisplayRealDomain = 1;
                 DisplayAll = 0;
                 break;
             case 'a':
@@ -169,6 +175,7 @@
             printf("%lu\n",  vdir.cur_users);
             close_big_dir(realdomain,uid,gid);
         }
+        if ( DisplayRealDomain ) printf("%s\n", realdomain);
     }
 }

download

 
Copyright 2009 Jukka Kurkela <jukka.kurkela@tjc.fi>
patches/vdominfo-5.4.26.realdomain.patch.txt · Last modified: 2009/01/01 18:21 by jukka_kurkela