Mailing List Archive

How to avoid 1000's of files in ~alias/
Hi

I'm about to setup a forwarding host for ~300 domains, what I want to
achieve is users having mail adresses xxx@yyy-domain.dk, to have
mail-aliases zzz@city-name.dk

My plan is to have, the following in /var/qmail/controls/virtualdomains

city1.dk:city1
city2.dk:city2
...

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?

/Jesper

--
Jesper Skriver E-mail: jesper@int.tele.dk (work)
BOFH / System manager E-mail: jesper@skriver.dk (private)
Tele Danmark Internet Voice: +45 86783300

One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone bind them.
Re: How to avoid 1000's of files in ~alias/ [ In reply to ]
[ Jesper Skriver <jesper@skriver.dk> 1997-3 -18 11:29 +0100 ]
|---
| Hi
|
| I'm about to setup a forwarding host for ~300 domains, what I want to
| achieve is users having mail adresses xxx@yyy-domain.dk, to have
| mail-aliases zzz@city-name.dk
|
| My plan is to have, the following in /var/qmail/controls/virtualdomains
|
| city1.dk:city1
| city2.dk:city2
| ...
|
| 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?

Don't use lots of .qmail files, use users/assign instead. Here is how:

* Set up controls/virtualdomains just like you planned.

* For each address zzz@city-name.dk that you want forwarded to
xxx@yyy-domain.dk, cause the following line to be in users/assign:

=city-name-zzz:alias:111:222:/var/qmail/alias:+:fwd-xxx@yyy-domain.dk:

and remember to run /var/qmail/bin/qmail-newu whenever users/assign
is updated. Here 111 and 222 are the uid and gid of the alias user.

* Finally, do

echo '|forward "$EXT2"' > /var/qmail/alias/.qmail+fwd-default

(note that the use of .qmail+fwd-default rather than .qmail-fwd-default
stops others from using this mechanism to use you as a relay)

- Harald