I don't know if this is the proper forum for this, but I'd like to make
a feature request for MD.
I ran into a problem quarantining messages on a FreeBSD 5.4 box.
Specifically, I hit the upper limit for the number of directories a
single directory can hold (32767). I store about 2 weeks of quarantined
mail in case anything needs to be released and I average over 3000
quarantined messages daily.
The solution was to create 256 directories under MD-Quarantine (00-FF
inclusive), have get_quarantine_dir() randomly generate a number,
convert it to hex, and append it to $Features{'Path:QUARANTINEDIR'}.
get_quarantine_dir():
my $HexSubdir = sprintf("%02X",rand(256));
do {
$counter++;
$QuarantineSubdir =
sprintf("%s/%s/qdir-%s-%03d",$Features{'Path:QUARANTINEDIR'},$HexSubdir,
$tm,$counter);
if (mkdir($QuarantineSubdir, 0750)) {
$success = 1;
}
} while (!$success && ($tries++ < 1000));
I don't know if there's a more ''elegant'' way of doing it, but it does
take care of the problem.
Thanks!
-- Dave
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang