Re: Forward non-existing accounts to another server (same domain)

Eric Shubert <[email protected]>
Newsgroups gmane.mail.vpopmail
Organization Eric Shubert & Associates
Message-ID <[email protected]>
On 05/09/2011 01:13 AM, Carlos Miranda Molina (Mstaaravin) wrote:
> Hi!
>
> I have one domain "mydomain.com" and i need split this between 3
> geographical places, differents users of course.
>
> the only solution that works for me is this:
> http://qmail.jms1.net/multi-location.shtml
>
> But, I want to avoid that configuration.
>
> In vpopmail FAQ (http://www.inter7.com/vpopmail/FAQ.txt) say:
>
> 22. How do I forward all email to a different site?
>    Edit the .qmail-default file and put in:
>    | /home/vpopmail/bin/vdelivermail '' [email protected]
>    This will forward all non matching emails to [email protected]
>
> No problem if they are different domains but each of my qmail has the
> same domain in my /var/qmail/rcpthosts and not same users.
>
> I need that when you send mail from [email protected] (in server1) to
> user [email protected] (in server2) qmail delivery mail to another
> server.
>
> what option I can use in my .qmail-default file....?  something like
>
>   | /home/vpopmail/bin/vdelivermail '' $EXT@anotherserverIP_or_variable
>
>
> i looked "environments variables" on
> http://www.lifewithqmail.org/lwq.html#config-files, but I do not
> understand.
>
> Thanks
>

One way to do this would be to use subdomains for each place, ie 
place1.mydomain.com, place2.mydomain.com, place3.mydomain.com. Set up 
the users with 'real' accounts in their proper subdomain. Also create 
appropriate MX records for each subdomain. In the primary domain, set up 
all users as forwards to their subdomain.

This does have a drawback in that in its simplest implementation, all 
email goes to the central/primary server first, then on to the 
appropriate subdomain. This might be avoided by replicating the primary 
domain to each of the subdomains (you'll need vpopmail configured with 
separate tables per domain for this), and having a local DNS resolver on 
each subdomain that points the MX for the primary domain to itself.

I haven't actually done the replication part of this, but I have set up 
a few subdomains. I think it would work, but of course YMMV.

-- 
-Eric 'shubes'


!DSPAM:4dc80fa732711891217879!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.