Interesting patch, but I would like something a bit more complicated: a multiline 
ldapmailhost control file. Suppose
the following:
you have 50000 accounts on 1 machine, but you foresee much more in the future. So then 
you can just start to split the
accounts using the mailhost attribute (all different names point to the same ip) and 
later on just change dns when you
feel the need for an extra server(s) (and then transfer the accounts needed)
But this patch is the first step towards that of course.

Franky


Henning Brauer wrote:

> Hi Folks,
>
> imagine the following situation:
>
> You are running two qmail instances on the same box. One ist listed as MX
> for your domains, the second one is used by your customers to carry in mails
> via smtp. If you don't use clustering everything is fine: you are just
> using the same control/locals and control/rcpthosts for both instances
> (rcpthosts should not be needed, though, as only customers having
> RELAYCLIENT set should send mails, but this does not matter here). Both
> qmail instances deliver directly to the Maildirs, which is no problem due to
> the lock-free Maildir design.
> If you turn on clustering there will be an extra delivery for each mail in
> one of those two instances: qmail-lspawn detects the difference between the
> mailHost attribute in LDAP and control/me and forwards the mail via qmqp to
> the second instance on the same machine. This is unneeded and of course has a
> performance penalty. You could of course link qmail-queue from one instance
> to the other to only have obe queue, but having two independent queues is
> one of the targets in this setup.
> The small patch below adds a new control file "ldapmailhost". qmail-lspawn
> now delivers locally if mailHost=control/me. With this patch, it delivers
> locally if either mailHost=control/me or mailHost=control/ldapmailhost.
> The patch is small and IMHO clean. It has no disadvantages if
> control/ldapmailhost does not exist, and I'd love to see it included in the
> next release instead of maintaining my 6th third-party patch.
>
> btw, the scenario above applies also if you are running more than one box
> with direct access to the same maildirs, e. g. over NFS, but need
> clustering, too, e. g. if you have a box located in another country and want
> to store some mailboxes there.
>
> An implementation sidenote: I decided to default control/ldapmailhost to
> control/me so the behaviour on accounts with empty mailHost attributes
> does not change.
>
> Greetings
>
> Henning



Reply via email to