Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Nicholas Harring




Bruno Negro wrote:

  
  
  
  Hi all,
  
  I have to solve the famous problem
of splitting a unique domain into 2 remote machines. One machine gonna
be the MX for the domain but will contain only part of the e-mail
accounts. The other half of the e-mail accounts will be configured in
the other server. Creating two subdomains *is not a valid alternative*
for me.

I can't see how you could actually want this. Are you planning on then
putting some sort of imap proxy in front of the box to direct logins to
the correct place? What does this do for you that a cluster with shared
storage doesn't?

  
  Is it possibleto do thiselegantly
with vpopmail?
  
  Until now, the most elegant solution
i have seen is using Qmail + qmail-ldap patch + Open LDAP. In this
scenario, vpopmailwouldn'tbe used. 
  
  I know there is also a vpopmail-ldap
patch, but i understood that it doesn't foresee the case of splitting a
domain into two different servers.
  
  Thanks in advance,
  bnegrao

I wish I could offer a solution directly to your question, but it
definitely looks like you're attacking the problem in a less than
optimal way.
Cheers,
Nick Harring
Webley Systems




Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Bruno Negrão



I can't see how you could actually want this. Are you planning on then 
putting some sort of imap proxy in front of the box to direct logins to the 
correct place? What does this do for you that a cluster with shared storage 
doesn't?

Hi Nick,

What a "cluster with shared storage" means? Where 
can i learn moreabout this topic?
bruno


Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Nicholas Harring




Bruno Negro wrote:

  
  
  
  
  I can't see how you could actually want this. Are you
planning on then putting some sort of imap proxy in front of the
box to direct logins to the correct place? What does this do for you
that a cluster with shared storage doesn't?
  
  Hi Nick,
  
  What a "cluster with shared storage"
means? Where can i learn moreabout this topic?
  
  bruno

Bruno -
You can simply have an NFS server, or CIFS or whatever, that the
vpopmail domain directories are mounted from. Search the archives of
this list for cluster and you'll find several people describing the
setup they use. Its much, much easier to scale a domain that way than
splitting it across servers with each mailbox being mapped to only one
server.
Hope that helps,
Nick




Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Itamar Reis Peixoto



Pra que voce quer fazer isto Bruno ?

  - Original Message - 
  From: 
  Bruno 
  Negrão 
  To: [EMAIL PROTECTED] 
  Sent: Monday, August 23, 2004 2:39 
  PM
  Subject: Re: [vchkpw] How to Split a 
  domain into 2 machines?
  
  I can't see how you could actually want this. Are you planning on 
  then putting some sort of imap proxy in front of the box to direct logins 
  to the correct place? What does this do for you that a cluster with shared 
  storage doesn't?
  
  Hi Nick,
  
  What a "cluster with shared storage" means? Where 
  can i learn moreabout this topic?
  bruno


Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Bruno Negrão



Nick,

The qmail-ldap patch appears to offer a clean 
solution for this problem since it creates an ldap for the email accounts that 
can be share amongst the corporate email servers. When qmail-ldap wants to 
deliver a message to a local user, it checks in the ldap database for the 
properti "mailhost" of that user. The mailhost property sets the host where the 
maildir of that account is physically configured. Then, the e-mail is forwarded 
to that host.

There is a document called "Life with Qmail-Ldap", 
in http://www.lifewithqmail.org/ldap/, 
that makes an introduction about the new capabilities gained when integrating 
qmail + an ldap database. 

Bellow, i cut and pasted this 
introduction:

"Lightweight Directory Access Protocol, or LDAP, is 
a very useful tool in administration of large networks and organizations. It is 
a database that is highly optimized for read operations, up to ten times faster 
than SQL database systems. One of the best features of LDAP is the ability to 
store user accounts. A single account entry can be used for logging in to unix 
workstations, imap servers, access controlled web pages, and email account 
storage.
With the qmailUser schema and user accounts loaded 
into an LDAP server, Qmail-LDAP can be configured so that all mail servers in an 
organization can share this same account data. Qmail-LDAP supports message 
routing to the mailhost specified in each users account entry, even when all 
internal email accounts use business card style addresses such as 
[EMAIL PROTECTED] There is no need to use internal addresses like 
[EMAIL PROTECTED] and convert them to [EMAIL PROTECTED] when mail leaves 
the intranet.
Using LDAP to store Qmail-LDAP email accounts 
requires either building an LDAP directory, or modifying your existing 
directory. Since Qmail-LDAP requires the administrator to have a prior 
understanding of LDAP, this section of the HOWTO does not deal with basic LDAP 
or unix topics. For those who are completely unfamiliar with LDAP directory 
construction and administration, there are excellent books available and there 
are searchable mailing list archives at http://www.openldap.org.
1. The first part of setting up the directory server 
to work with Qmail-LDAP is to add the schema. This is not required if you have 
disabled schema checking, however running an LDAP server with schema checking 
disabled is highly discouraged. How the schema is loaded depends on the server 
you are using."
Regards,
bruno


Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Bruno Negrão
Hi Itamar,

 Pra que voce quer fazer isto Bruno ?
(he is asking me why would I want to do this)

To answer it i'll have to explain a little about my network.

Here where i'm working is the central node of a big network.

We are the mailserver for some companys that are connected to us through
leased lines. Some of these links are slow 64K links.

There is a company connected to us using a 64K link that wants the
mailserver for their domain installed directly in their LAN, to speed up
the mail transition and to avoid the internal mail traffic passing through
this link every time a local employee send a message to other local
employee.

The problem about moving their mailserver from here (the central node) to
their local network is that they have a big filial in another state that is
also connected to us. When we move their MX box to their LAN, everybody in
the filial will have to pass throught their 64KB link to send and receive
e-mail, thus, consuming their bandwidth again.

So, to avoid this, i want the filial maildirs to stay configured here in
the central node of the network. And the maildirs of the biggest office
will be configured in their own local mailserver.

Could you understand me?

Regards,
bruno.




Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Itamar Reis Peixoto
Yes, I understand.


I don´t know how to make it, Try qmail-ldap.

- Original Message -
From: Bruno Negrão [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 23, 2004 3:36 PM
Subject: Re: [vchkpw] How to Split a domain into 2 machines?


 Hi Itamar,

  Pra que voce quer fazer isto Bruno ?
 (he is asking me why would I want to do this)

 To answer it i'll have to explain a little about my network.

 Here where i'm working is the central node of a big network.

 We are the mailserver for some companys that are connected to us through
 leased lines. Some of these links are slow 64K links.

 There is a company connected to us using a 64K link that wants the
 mailserver for their domain installed directly in their LAN, to speed up
 the mail transition and to avoid the internal mail traffic passing through
 this link every time a local employee send a message to other local
 employee.

 The problem about moving their mailserver from here (the central node) to
 their local network is that they have a big filial in another state that
is
 also connected to us. When we move their MX box to their LAN, everybody in
 the filial will have to pass throught their 64KB link to send and receive
 e-mail, thus, consuming their bandwidth again.

 So, to avoid this, i want the filial maildirs to stay configured here in
 the central node of the network. And the maildirs of the biggest office
 will be configured in their own local mailserver.

 Could you understand me?

 Regards,
 bruno.






Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Rick Romero

How about 2 qmail installs?
After you install qmail once, change conf-qmail to have a qmail2.
make setup check again, and you have a 2nd qmail install.

In there, change smtproutes to point your domain to your 2nd server.

Then for each user that exists on the 2nd server, make a .qmail-default
with:
|/var/qmail2/bin/forward [EMAIL PROTECTED]

(remember to run your qmail-send process from the 2nd install, or
nothing will go out - Yes yes.. It got me :)

Rick

On Mon, 2004-08-23 at 13:36, Bruno Negrão wrote:
 Hi Itamar,
 
  Pra que voce quer fazer isto Bruno ?
 (he is asking me why would I want to do this)
 
 To answer it i'll have to explain a little about my network.
 
 Here where i'm working is the central node of a big network.
 
 We are the mailserver for some companys that are connected to us through
 leased lines. Some of these links are slow 64K links.
 
 There is a company connected to us using a 64K link that wants the
 mailserver for their domain installed directly in their LAN, to speed up
 the mail transition and to avoid the internal mail traffic passing through
 this link every time a local employee send a message to other local
 employee.
 
 The problem about moving their mailserver from here (the central node) to
 their local network is that they have a big filial in another state that is
 also connected to us. When we move their MX box to their LAN, everybody in
 the filial will have to pass throught their 64KB link to send and receive
 e-mail, thus, consuming their bandwidth again.
 
 So, to avoid this, i want the filial maildirs to stay configured here in
 the central node of the network. And the maildirs of the biggest office
 will be configured in their own local mailserver.
 
 Could you understand me?
 
 Regards,
 bruno.




Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Itamar Reis Peixoto
other solution is creating a subdomain in second machine and  add an alias
on the first machine to forward the message to second machine.



- Original Message -
From: Rick Romero [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 23, 2004 4:08 PM
Subject: Re: [vchkpw] How to Split a domain into 2 machines?



 How about 2 qmail installs?
 After you install qmail once, change conf-qmail to have a qmail2.
 make setup check again, and you have a 2nd qmail install.

 In there, change smtproutes to point your domain to your 2nd server.

 Then for each user that exists on the 2nd server, make a .qmail-default
 with:
 |/var/qmail2/bin/forward [EMAIL PROTECTED]

 (remember to run your qmail-send process from the 2nd install, or
 nothing will go out - Yes yes.. It got me :)

 Rick

 On Mon, 2004-08-23 at 13:36, Bruno Negrão wrote:
  Hi Itamar,
 
   Pra que voce quer fazer isto Bruno ?
  (he is asking me why would I want to do this)
 
  To answer it i'll have to explain a little about my network.
 
  Here where i'm working is the central node of a big network.
 
  We are the mailserver for some companys that are connected to us through
  leased lines. Some of these links are slow 64K links.
 
  There is a company connected to us using a 64K link that wants the
  mailserver for their domain installed directly in their LAN, to speed up
  the mail transition and to avoid the internal mail traffic passing
through
  this link every time a local employee send a message to other local
  employee.
 
  The problem about moving their mailserver from here (the central node)
to
  their local network is that they have a big filial in another state that
is
  also connected to us. When we move their MX box to their LAN, everybody
in
  the filial will have to pass throught their 64KB link to send and
receive
  e-mail, thus, consuming their bandwidth again.
 
  So, to avoid this, i want the filial maildirs to stay configured here in
  the central node of the network. And the maildirs of the biggest office
  will be configured in their own local mailserver.
 
  Could you understand me?
 
  Regards,
  bruno.






Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Bruno Negrão

 How about 2 qmail installs?
 After you install qmail once, change conf-qmail to have a qmail2.
 make setup check again, and you have a 2nd qmail install.

 In there, change smtproutes to point your domain to your 2nd server.

 Then for each user that exists on the 2nd server, make a .qmail-default
 with:
 |/var/qmail2/bin/forward [EMAIL PROTECTED]

 (remember to run your qmail-send process from the 2nd install, or
 nothing will go out - Yes yes.. It got me :)
Rick,  are you currently using this?

It seems you omitted that I would have to make the same thing in the second
server, creating .qmail files forwarding messages to the users configured
in the 1st server.

I think this configuration isn't scalable. What would happen if I'd like to
split the domain through 3 or more machines? Or if I'd like to split other
domains through other servers? It would became an administration
nightmare... don't you think?

The qmail-ldap still appears to be the best solution. The only disadvantage
is, besides I'll be obligated to understand all about LDAP concepts,
qmail-ldap seems to be difficult to install and configure at a first look.
This gonna be a lot of work...

Regards,
bruno.




Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Rick Romero
On Mon, 2004-08-23 at 14:44, Bruno Negrão wrote:
 
  How about 2 qmail installs?
  After you install qmail once, change conf-qmail to have a qmail2.
  make setup check again, and you have a 2nd qmail install.
 
  In there, change smtproutes to point your domain to your 2nd server.
 
  Then for each user that exists on the 2nd server, make a .qmail-default
  with:
  |/var/qmail2/bin/forward [EMAIL PROTECTED]
 
  (remember to run your qmail-send process from the 2nd install, or
  nothing will go out - Yes yes.. It got me :)
 Rick,  are you currently using this?

For a whole domain.  Not per user.

 It seems you omitted that I would have to make the same thing in the second
 server, creating .qmail files forwarding messages to the users configured
 in the 1st server.

No, if you create a .qmail-default for each user that needs to be
forwarded, you only need to create THOSE users on the 2nd server.

 I think this configuration isn't scalable. What would happen if I'd like to
 split the domain through 3 or more machines? Or if I'd like to split other
 domains through other servers? It would became an administration
 nightmare... don't you think?

Then I'd set a flag, or create a field in MySQL - and look at using
maildrop for the redirection, after a perl script checks for the routing
information.

 
 The qmail-ldap still appears to be the best solution. The only disadvantage
 is, besides I'll be obligated to understand all about LDAP concepts,
 qmail-ldap seems to be difficult to install and configure at a first look.

That's the main reason I suggested just using a 2nd qmail install.  It's
easy to create, and there's really nothing special about it.

 This gonna be a lot of work...

No matter how you do it, breaking up a domain based on username is going
to take a lot of work.

Rick

 Regards,
 bruno.




Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Rick Romero
On Mon, 2004-08-23 at 14:57, Rick Romero wrote:
 On Mon, 2004-08-23 at 14:44, Bruno Negrão wrote:
  
   How about 2 qmail installs?
   After you install qmail once, change conf-qmail to have a qmail2.
   make setup check again, and you have a 2nd qmail install.
  
   In there, change smtproutes to point your domain to your 2nd server.
  
   Then for each user that exists on the 2nd server, make a .qmail-default
   with:
   |/var/qmail2/bin/forward [EMAIL PROTECTED]
  
   (remember to run your qmail-send process from the 2nd install, or
   nothing will go out - Yes yes.. It got me :)
  Rick,  are you currently using this?
 
 For a whole domain.  Not per user.
 
  It seems you omitted that I would have to make the same thing in the second
  server, creating .qmail files forwarding messages to the users configured
  in the 1st server.
 
 No, if you create a .qmail-default for each user that needs to be
 forwarded, you only need to create THOSE users on the 2nd server.
 
  I think this configuration isn't scalable. What would happen if I'd like to
  split the domain through 3 or more machines? Or if I'd like to split other
  domains through other servers? It would became an administration
  nightmare... don't you think?
 
 Then I'd set a flag, or create a field in MySQL - and look at using
 maildrop for the redirection, after a perl script checks for the routing
 information.

The only way to avoid creating users on each of those multiple servers
would be to use MySQL replication.  Then you still only have 1 point of
administration, and your maildrop/perl/SQL thingy in your .qmail-default
would do the forwarding for you (when you create the user, you'd set the
'home server' for your forwarding script).

Your script could call a separate qmail install for each remote server,
or use subdomains like someone else suggested.

  
  The qmail-ldap still appears to be the best solution. The only disadvantage
  is, besides I'll be obligated to understand all about LDAP concepts,
  qmail-ldap seems to be difficult to install and configure at a first look.
 
 That's the main reason I suggested just using a 2nd qmail install.  It's
 easy to create, and there's really nothing special about it.
 
  This gonna be a lot of work...
 
 No matter how you do it, breaking up a domain based on username is going
 to take a lot of work.
 
 Rick
 
  Regards,
  bruno.




Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Bruno Negrão
Hi Rick,

  Rick,  are you currently using this?

 For a whole domain.  Not per user.
I can't get you, what you mean for a whole domain, not per user? I want
to split a whole domain... (??) You told you have to create a .qmail file
on the 1st server for every account that is configured on the 2nd server.
Isn't it per user configuration too?

  It seems you omitted that I would have to make the same thing in the
second
  server, creating .qmail files forwarding messages to the users
configured
  in the 1st server.

 No, if you create a .qmail-default for each user that needs to be
 forwarded, you only need to create THOSE users on the 2nd server.
But what happens when a user of the second server send an email to a user
of the first server? the seconds server would bounce an error message this
account doesn't exist if it is not configured to forward the e-mails for
unexistent accounts for the fisrt server.

  I think this configuration isn't scalable. What would happen if I'd
like to
  split the domain through 3 or more machines? Or if I'd like to split
other
  domains through other servers? It would became an administration
  nightmare... don't you think?

 Then I'd set a flag, or create a field in MySQL - and look at using
 maildrop for the redirection, after a perl script checks for the routing
 information.
This was too interesting. Can you write this with more detail? I never used
vpopmail integrated with MySQL, and I don't master databases or SQL. What
program would check the mysql database to discover where the maildir is
installed?

If qmail-ldap already addresses this problem, do you believe it is worth to
reimplement this using an mysql database? Wouldn't it be reinventing the
wheel?

Regards,
bruno.



Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Rick Romero
On Mon, 2004-08-23 at 15:18, Bruno Negrão wrote:
 Hi Rick,
 
   Rick,  are you currently using this?
 
  For a whole domain.  Not per user.
 I can't get you, what you mean for a whole domain, not per user? \

:)  I use the 2nd qmail install for forwarding a whole domain, not an
individual user account.

 I want
 to split a whole domain... (??) You told you have to create a .qmail file
 on the 1st server for every account that is configured on the 2nd server.
That's the easiest way to do it.  But like you said, that would not be
very scalable.. But it all depends on your needs.  

 Isn't it per user configuration too?

That would be easiest initially.

 
   It seems you omitted that I would have to make the same thing in the
 second
   server, creating .qmail files forwarding messages to the users
 configured
   in the 1st server.
 
  No, if you create a .qmail-default for each user that needs to be
  forwarded, you only need to create THOSE users on the 2nd server.
 But what happens when a user of the second server send an email to a user
 of the first server?  The seconds server would bounce an error message this
 account doesn't exist if it is not configured to forward the e-mails for
 unexistent accounts for the fisrt server.

I was assuming you already have a relay setup, which isn't your POP/IMAP
server.  Again though, to keep it 'simple', you could run a 2nd instance
of qmail on that server, listening on it's own IP.  It would follow the
MX records for all domains (so yes, sending internally would not be
efficient, because it would goto the 1st server, and back to the 2nd). 
There's your outgoing address.

   I think this configuration isn't scalable. What would happen if I'd
 like to
   split the domain through 3 or more machines? Or if I'd like to split
 other
   domains through other servers? It would became an administration
   nightmare... don't you think?
 
  Then I'd set a flag, or create a field in MySQL - and look at using
  maildrop for the redirection, after a perl script checks for the routing
  information.
 This was too interesting. Can you write this with more detail? I never used
 vpopmail integrated with MySQL, and I don't master databases or SQL. What
 program would check the mysql database to discover where the maildir is
 installed?

Well.. most vpopmail 'toasters' I've seen lately use MySQL as the user
store.  So (again to make it simple) were you to add an extra field to
the vpopmail table (server_number), and have a perl script check that
field, for the # :

#!/usr/local/bin/perl -w
use strict;
use DBI;
my ($hash_ref);
my $driver = DBI-install_driver('mysql');
my $dbh = DBI-connect('DBI:mysql:vpopmail','vpopmail','vpoppass');
die Unable to Connect $DBI::errstr\n unless (defined $dbh);

my $table_data = $dbh-prepare(q{SELECT * FROM vpopmail WHERE (pw_domain
= ? AND pw_name=?)});
$table_data-execute($ARGV[1],$ARGV[0]);
if ($hash_ref = $table_data-fetchrow_hashref){
echo Server Number:  $hash_ref-{server_number} .\n;
exit $hash_ref-{pw_svclvl};
}
#print Not Found!!\n;
else { exit (1); }

Then in your .qmail-default (for the domain):

| maildrop mailfilter

In your mailfilter file:

SHELL=/bin/sh
VPOP=| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
VFWD2=| /var/qmail2/bin/forward [EMAIL PROTECTED]
VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
MAILDIR=$VHOME/Maildir
#Run your Perl script from here
`/home/vpopmail/domains/host.com/getserver_number.pl $EXT $HOST`
if ( $RETURNCODE == 0 )
{
#deliver locally
to $VHOME
}
if ( $RETURNCODE == 1 )
{
# Send to Server2
to $VFWD2 
}


Ok, I just did that off the top of my head, so I can't guarantee it will
work, or is efficient :P

 
 If qmail-ldap already addresses this problem, do you believe it is worth to
 reimplement this using an mysql database? Wouldn't it be reinventing the
 wheel?

If you don't know SQL or ldap, I suppose it wouldn't matter either way. 
But it seems to me you're going to have better luck finding help if you
don't got the ldap way - just because fewer people are using qmail-ldap.

Anyways, Above I combined two things that I do in production.  The first
is check the user's Service Level field in MySQL, then filter Spam
based on that.  The other is the second qmail install for forwarding all
users to another server.. Yes, It would be easier to do SMTP routes, but
that customer wanted their own specific SpamAssassin config, so I have
to run it through their own SpamAssain config before I can reforward it.

Rick

 Regards,
 bruno.



Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Jean Wainer
Just out of curiosity, Rick..


On Mon, 23 Aug 2004 15:41:09 -0500
Rick Romero [EMAIL PROTECTED] wrote:

 On Mon, 2004-08-23 at 15:18, Bruno Negrão wrote:
  Hi Rick,
  
Rick,  are you currently using this?
  
   For a whole domain.  Not per user.
  I can't get you, what you mean for a whole domain, not per user? \
 
 :)  I use the 2nd qmail install for forwarding a whole domain, not an
 individual user account.

Why not just using smtproutes?

--Jw.


Re: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Rick Romero
On Mon, 2004-08-23 at 12:53, Jean Wainer wrote:
 Just out of curiosity, Rick..
 
 
 On Mon, 23 Aug 2004 15:41:09 -0500
 Rick Romero [EMAIL PROTECTED] wrote:
 
  On Mon, 2004-08-23 at 15:18, Bruno Negrão wrote:
   Hi Rick,
   
 Rick,  are you currently using this?
   
For a whole domain.  Not per user.
   I can't get you, what you mean for a whole domain, not per user? \
  
  :)  I use the 2nd qmail install for forwarding a whole domain, not an
  individual user account.
 
 Why not just using smtproutes?
You missed the bottom of the last email :P

That specific customer wanted specific SpamAssassin settings, and
running received email through spam assassin, then forwarding it via a
2nd qmail install seemed the easiest way to do it. 

I run SpamAssassin from Qmail-Scanner via tcpserver and the qmailqueue
patch..  So theirs gets scanned twice, but that's not a problem.

Rick

 
 --Jw.



RE: [vchkpw] How to Split a domain into 2 machines?

2004-08-23 Thread Shouguan Lin
 -Original Message-
 From: Bruno Negrão [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 20, 2004 2:10 PM
 To: [EMAIL PROTECTED]
 Subject: [vchkpw] How to Split a domain into 2 machines?

 Hi all,
 
 I have to solve the famous problem of splitting a unique domain into 2 remote 
 machines. One machine gonna be the MX for  the
domain but will contain only part of the e-mail accounts. The other half of the e-mail 
accounts will be configured  in the other
server. Creating two subdomains *is not a valid alternative* for me.
 
 Is it possible to do this elegantly with vpopmail?
 
 Until now, the most elegant solution i have seen is using Qmail + qmail-ldap patch + 
 Open LDAP. In this scenario, vpopmail
wouldn't be used. 
 
 I know there is also a vpopmail-ldap patch, but i understood that it doesn't foresee 
 the case of splitting a domain into  two
different servers.
 
 Thanks in advance,
 bnegrao

I wrote a patch (or quick hack) to do this and have been running this setup in 
production for more than months without any problem.
The patch for 5.4.3 is located at 
http://www.sigrity.com/oss/vdelivermail.c.patch-5.4.3 and patches can be generated if 
requested.
If more people are interested in this, we could propose a mailhost field just like in 
qmail-ldap to make it cleaner.

Here is the brief setup instruction:

For two mail servers (can be more) mail1.x.com and mail2.y.com. Any of mail servers 
can be MX hosts.
1] Setup vpopmail on both mail servers to host x.com as usual.
2] Add mail1.x.com as an alias to x.com domain on mail1.x.com and add mail1.x.com to 
VPOPMAILHOME/etc/locals
3] Add mail2.x.com as an alias to x.com domain on mail2.x.com and add mail2.x.com to 
VPOPMAILHOME/etc/locals
4] Set user fullname to Full [EMAIL PROTECTED] for email accounts on mail1.x.com
5] Set user fullname to Full [EMAIL PROTECTED] for email accounts on mail2.x.com

All emails are routed according the setting in the fullname field and using SMTP (not 
like qmail-ldap).  The vpopmail db needs to be
synchronized between sites so mysql backend is preferred but cdb should work too.

Any comment are welcomed.

Hope it will solve your problem.

Shouguan Lin