Mailing List Archive

many domains to receive email for
Hi folks,

i have the following scenario:

I have 100k domain to qmail to receive for.
Having the traditional way, it would scan a file configuration in a
linear search: it would be too slow.

How do you handle a large set of domain to receive email for ?


Thanks in advance.

--
Pag Bem Fácil Ltda
www.pagbemfacil.com.br
Re: many domains to receive email for [ In reply to ]
On Mon, Sep 02, 2019 at 06:51:13PM -0300, Gustavo Rios wrote:
> i have the following scenario:
>
> I have 100k domain to qmail to receive for.
> Having the traditional way, it would scan a file configuration in a
> linear search: it would be too slow.
>
> How do you handle a large set of domain to receive email for ?
>

You're correct that the rcpthosts file would be a linear scan, but
qmail-smtpd also supports morercpthosts, converted to a cdb file
via the qmail-newmrh command. The manpage for qmail-smtpd offers:

Put your 50 most commonly used domains into rcpthosts, and the
rest into morercpthosts

Is there a part of your problem not satisfied via use of the
morercpthosts and the qmail-newmrh command?

-A
--
Alan Post | Xen VPS hosting for the technically adept
PO Box 61688 | Sunnyvale, CA 94088-1681 | https://prgmr.com/
email: adp@prgmr.com
Re: many domains to receive email for [ In reply to ]
Thanks a lot.

One more doubt: what about "locals" file ? Does it have a program to
build a cdb database file ?

Thanks again

Em seg, 2 de set de 2019 às 19:21, Alan Post <adp@prgmr.com> escreveu:
>
> On Mon, Sep 02, 2019 at 06:51:13PM -0300, Gustavo Rios wrote:
> > i have the following scenario:
> >
> > I have 100k domain to qmail to receive for.
> > Having the traditional way, it would scan a file configuration in a
> > linear search: it would be too slow.
> >
> > How do you handle a large set of domain to receive email for ?
> >
>
> You're correct that the rcpthosts file would be a linear scan, but
> qmail-smtpd also supports morercpthosts, converted to a cdb file
> via the qmail-newmrh command. The manpage for qmail-smtpd offers:
>
> Put your 50 most commonly used domains into rcpthosts, and the
> rest into morercpthosts
>
> Is there a part of your problem not satisfied via use of the
> morercpthosts and the qmail-newmrh command?
>
> -A
> --
> Alan Post | Xen VPS hosting for the technically adept
> PO Box 61688 | Sunnyvale, CA 94088-1681 | https://prgmr.com/
> email: adp@prgmr.com



--
Pag Bem Fácil Ltda
www.pagbemfacil.com.br
Re: many domains to receive email for [ In reply to ]
On Mon, Sep 02, 2019 at 07:26:18PM -0300, Gustavo Rios wrote:
> One more doubt: what about "locals" file ? Does it have a program to
> build a cdb database file ?
>

In that case I'd recommend a single wildcard line in the virtualdomains
file. There is no cdb equivalent to locals or virtualdomains.

-A
--
Alan Post | Xen VPS hosting for the technically adept
PO Box 61688 | Sunnyvale, CA 94088-1681 | https://prgmr.com/
email: adp@prgmr.com
Re: many domains to receive email for [ In reply to ]
May you show me what text as wildcard should work ?

Thanks

Em seg, 2 de set de 2019 às 19:40, Alan Post <adp@prgmr.com> escreveu:
>
> On Mon, Sep 02, 2019 at 07:26:18PM -0300, Gustavo Rios wrote:
> > One more doubt: what about "locals" file ? Does it have a program to
> > build a cdb database file ?
> >
>
> In that case I'd recommend a single wildcard line in the virtualdomains
> file. There is no cdb equivalent to locals or virtualdomains.
>
> -A
> --
> Alan Post | Xen VPS hosting for the technically adept
> PO Box 61688 | Sunnyvale, CA 94088-1681 | https://prgmr.com/
> email: adp@prgmr.com



--
Pag Bem Fácil Ltda
www.pagbemfacil.com.br
Re: many domains to receive email for [ In reply to ]
On Mon, Sep 02, 2019 at 08:36:52PM -0300, Gustavo Rios wrote:
> May you show me what text as wildcard should work ?
>

The qmail-send manpage, under the virtualdomains section, has examples:

virtualdomains may contain wildcards:

.fax:uucp-fax
:alias-catchall
.nowhere.mil:joe-foo-host

As best as I understand your circumstances, the middle example is
what you want.

If this causes you to ask further questions, please follow-up by
describing the problem you're having, in detail, to include the
behavior you are getting vs the behavior you expect, and if possible
error messages you receive. This will demonstrate to us that you are
trying to solve your problem, by showing us your work.

-A
--
Alan Post | Xen VPS hosting for the technically adept
PO Box 61688 | Sunnyvale, CA 94088-1681 | https://prgmr.com/
email: adp@prgmr.com