"Greg Kopp" <[EMAIL PROTECTED]> wrote:
> 
> 1. What is morerecpthosts and morercpthosts.cdb? Is there a limit to the
> number of hosts that can be in the rcpthosts file?

morercpthosts is (as the name implies) a supplement to rcpthosts, which is
used by qmail-smtpd to decide whether to accept mail. rcpthosts lists hosts
for which qmail-smtpd is allowed to accept email. morercpthosts, if it
exists, ``is effectively appended to rcpthosts'' [see qmail-smtpd(8)].
morercpthosts.cdb is created by running qmail-newmrh with morercpthosts
as input. You must do this, because morercpthosts.cdb is what qmail-smtpd
actually uses.

The idea here is to make qmail-smtpd faster IF you handle mail for a
very large number of domains. As a rule of thumb, ``large'' means more
than fifty. Putting your most commonly used sites in rcpthosts means
that qmail-smtpd will usually ignore morercpthosts.cdb. When the client
specifies an envelope recipient whose domain is not in rcpthosts, then
qmail-smtpd will check for the domain in morercpthosts.cdb as a fallback.

> 2. Do you think it would be safe to use NFS to mount my /var/qmail/control
> directory on our backup MX and then use symlinks of the nfs mounted
> rcpthosts file to the local file? For the number of domains I have, I want
> to avoid having to edit multiple files everytime we add one or delete one.
> Should I also link morercpthosts and morercpthosts.cdb?

If you do this, then the two MX hosts will behave _identically_. In
particular, qmail on the backup MX will try to do local deliveries because
of the shared copy of control/locals. If that's what you want, then you
_can_ do this; just be very sure its what you want.

To my little brain, though, it doesn't make a lot of sense to share
everything in /var/qmail/control. It would make more sense if you put
both hosts IP addresses under the same name, and set your DNS server
to hand out both addresses randomly for load-balancing purposes. You
will also have to NFS-mount the delivery destinations (/var/spool or
users' home directories) so that either host can do local deliveries.

If by ``backup MX'' you really mean ``secondary MX'', then I wouldn't
use this scheme. Instead, I would use ssh and rsync to share carefully
selected files (such as rcpthosts and morercpthosts). Put the right
commands in /var/qmail/control/Makefile on your authoritative host, and
run ``make'' after updating any control files.

Len.

--
Frugal Tip #30:
Let a large corporation pay you big bucks to tattoo their company logo
on your bald spot.

Reply via email to