Mailing List Archive

How to avoid 1000's of files in ~alias/
Jesper Skriver writes:
>
> This is to avoid too many .qmail files in ~alias/, but each of these
> virtual domain can potential contain 1000's of mailadresses, meaning
> 1000's of files in eg. ~city1/
>
> Does anybody have any suggestions for solving this problem? Or does it
> matter at all, if you have eg. 20000 .qmail files in one directory?

Most filesystems don't deal well with very large subdirectories, which
is too bad, because then programmers have to hack their way around
it. Why shouldn't the filesystem author do the hacking?

Anyway, what you probably want to do is use a different database than
the filesystem. Put a .qmail-default in your home directories, and
write a little program to look up the destination address. You could
even do it like this:

|forward `perl -n -e 'chomp;split;print $_[1] if $ENV{"LOCAL"} eq $_[0];' forwarding_database`

This presumes that none of your destination addresses have spaces in
them (e.g. "russ nelson"@crynwr.com), but that's a pretty sure bet.

--
-russ <nelson@crynwr.com> http://www.crynwr.com/~nelson
Crynwr Software sells network driver support | PGP ok
521 Pleasant Valley Rd. | +1 315 268 1925 voice | Peace, Justice, Freedom:
Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | pick two (only mostly true)