www.mamboteam.com
While.org.uk
Home arrow Forum
Wednesday, 07 January 2009
 
 
Main Menu
Home
Vispan
Downloads
Forum
- - - - - - - - - - - - - -
Trivial Firsts
Council Requests
Fun Zone
Picture Gallery
Lotus Esprit
Server Menu
CD Statistics
Statistics
Server Status
Login Form





Lost Password?
No account yet? Register
While.org.uk  


peter
User

Junior Boarder
Posts: 6
graphgraph
Karma: 0  
Patch for path to mail queue dirs - 2007/07/06 15:39 The path to the mail queue dirs (mqueue.in and mqueue) are hardcoded to /var/spool. I don't use that and get empty graphs for inbound and outbound queues as well as always a zero for pending mail. These patches add an option for your own path.

I hope they can be included in the next release of Vispan.

Code:

  --- Vispan.conf.070706  Fri Jul  6 16:47:57 2007 +++ Vispan.conf Fri Jul  6 16:49:47 2007 @@ -99,+99,@@  # in your mailscanner config file.  LogFile = /var/log/maillog +# Mail queue path prefix, default /var/spool +QueuePathPrefix = /var/spool +  # Space separated list of extra mail queue directories - used to work out  # the queue length.  Queue_Dirs = --- Print.pm.070706     Fri Jul  6 16:47:38 2007 +++ Print.pm    Fri Jul  6 17:25:51 2007 @@ -836,+836,@@        }     # Get the length of the inbound mail queue -   opendir(QDIR"/var/spool/mqueue.in"); +   my $queue_path_prefix Vispan::Config::Value(QueuePathPrefix); +   opendir(QDIR$queue_path_prefix "/mqueue.in");     $mcount += scalar(grep { /^qf/ } readdir(QDIR));     closedir(QDIR); --- Stats.pm.070706     Fri Jul  6 16:47:29 2007 +++ Stats.pm    Fri Jul  6 17:24:03 2007 @@ -963,+963,10 @@     my $Days Vispan::Config::Value(Days) || 365;     my $Months Vispan::Config::Value(Months) || 24;     my $Years Vispan::Config::Value(Years) || 10; +   my $queue_path_prefix Vispan::Config::Value(QueuePathPrefix); -   foreach $mqueue (mailq_dir("/var/spool/mqueue")) { +   foreach $mqueue (mailq_dir($queue_path_prefix "/mqueue")) {        opendir(QDIR$mqueue);        $mcount += scalar(grep { /^qf/ } readdir(QDIR));        closedir(QDIR); @@ -973,+974,@@     $ThisInt{OutQueue} = $mcount;     $mcount 0; -   opendir(QDIR"/var/spool/mqueue.in"); +   opendir(QDIR$queue_path_prefix "/mqueue.in");     $mcount += scalar(grep { /^qf/ } readdir(QDIR));     closedir(QDIR);     $ThisInt{Queue} = $mcount;



Post edited by: peter, at: 2007/07/06 16:43

Post edited by: peter, at: 2007/07/06 16:44
  | | The administrator has disabled public write access.
admin
Admin

Admin
Posts: 4
graphgraph
Karma: 0  
Re:Patch for path to mail queue dirs - 2007/07/06 22:41 Thanks for this

I will incorporate into the next version.
  | | The administrator has disabled public write access.
 
Top! Top!