Hello, I am submitting a small patch to add an option to --virtual-config-dir= where if you use %U[1-9] it'll include [1-9], characters from the $safename variable.
The reason is because in our set up we have directory names like this:
/mailhome/b/brian/
/mailhome/c/chris/
etc.
I figured some people might be using
/mailhome/be/benny/
so I include the # argument.
patch attached and in plain text below.
brian
--- spamd 2005-01-20 21:02:16.000000000 -0500
+++ spamd.new 2005-01-20 21:05:15.000000000 -0500
@@ -1448,6 +1448,7 @@
my $dir = $opt{'virtual-config-dir'};
my $userdir;
my $prefsfile;
+ my $partname;
if ( defined $dir ) {
my $safename = $username;
@@ -1459,6 +1460,9 @@
$dir =~ s/\%u/${safename}/g;
$dir =~ s/\%l/${localpart}/g;
$dir =~ s/\%d/${domain}/g;
+ $dir =~ m/\%U(.)/;
+ $partname = substr($safename,0,$1);
+ $dir =~ s/\%U./${partname}/g;
$dir =~ s/\%\%/\%/g;
$userdir = $dir;
virt-path.patch
Description: Binary data
