Gavin [mailto:[EMAIL PROTECTED]] wrote:
> Greetings,
>
> We need to accept incoming mail for thousands of third-level domains (e.g.
> foo.bar.com).  Then we need to forward all mail for each third-level domain
> to an email address specified by the third-level domain's owner.
>
> Ideas?
>
> Hmmm.  Considering another option, what about a cool Web interface enabling
> the domain's owner to access email sent to their domain (e.g. foo.bar.com),
> with Qmail on the backend?
>
> Clearly, performance in the presence of thousands and thousands of
> third-level domains plays a key role in addition to the usual (e.g. total
> bandwidth of all emails).
>
> Cheers,
> Gavin

Well, to handle thousands of virtual domains (whether third-level or
second-level), you need to make lots of entries in two files control/rcpthosts
and control/virtualdomains. First off, control/virtualdomains can be large
without performance problems because it is only ready by qmail-send on startup
and then cached in memory. The control/rcpthosts is worse because it has to be
checked whenever an e-mail is accepted through SMTP. The solution is to use the
control/morercpthosts file, which is the same format, but is converted to a
quick lookup CDB database named morercpthosts.cdb by the qmail-newmrh program.

That's if you want to assign each virtual domain to a different user and then
split them out from there with a custom program. If you want to throw all the
e-mail at the same user, then use a wildcard entry in virtualdomains and
rcpthosts. See the qmail-send manpage for documentation on the virtualdomains
wildcarding.

 - David Harris
   Principal Engineer, DRH Internet Services

Reply via email to