On Wed, Jun 12, 2002 at 09:11:49PM +0800, K. F. Yim wrote:
> Since your Netscape Messaging Server is not one of the cluster host, anyone
> of your host can talk to it through SMTP protocol. smtproutes may be your
> tools.

Ah, but it _is_ one of the cluster hosts.

In fact, in this case, I have three mailstore hosts (let's call them 
nms01, nms02 (the Netscape Messaging servers) and qmail01 (the Qmail server). 
A user's LDAP entry will have a mailhost entry of any one of these three 
hostnames. So if an email has to go from qmail01 to one of the other 
machines, qmail will try and send it via QMQP - a protocol which Netscape 
obviously can't handle.

Yes, I know this is a rather insane thing to do, mixing servers like
this, but I don't have any other option. We have a particularly big 
NMS mailstore (> 1 million accounts) that we're stuck with, due to
politics - but it's incredibly unreliable, so we want to put more 
important customers on a better server. Hence qmail. But everyone is
going to still have the same domain name, irrespective of what their
mail backend is, and they are all going to sit in the same LDAP
directory.

What I've temporarily done, as proof of concept is changed part of 
qmail-lspawn.c so that it uses qmail-remote instead of qmail-qmqpc.
It does what I want for the moment, but I'm betting that it'll fail
miserably the moment one of the cluster nodes doesn't accept mail,
and there's probably a few other things I haven't looked at. So
obviously it's not my permanent solution:

void forward_mail(char *host, stralloc *to, char* from, int fdmess) {

char *(args[5]);

...

char *tmpto;

...

case 0:
        tmpto = (char *) malloc (sizeof(char) * (to->len) + 1);
        // Yes, yes, I know, I should check the result
        memcpy(tmpto,to->s,to->len);
        tmpto[to->len] = 0;

        ...

        args[0]="bin/qmail-remote"; args[1]=host; args[2]=from;
        args[3]=tmpto; args[4]=0;

...

}


Cheers,

Paul


-- 
Paul Dwerryhouse

"Why not just have the arresting officer execute you on the spot? If you turn 
 out to be innocent, they can cancel the invoice for the bullet." -- sharkey

Reply via email to