On Wed, Mar 03, 1999 at 11:50:10PM -0600, zach wrote:

Rule: domains cannot exist simultaneously in locals and virtualdomains.

> Hello,
> 
>       I just installed Qmail today and I am very pleased with it.  The
> only problem I seem to be having is virtual domain routing.  I host two
> domains on my machine other than the original one (deathvapor.org).  I
> am attempting to route all the mail for domain1.com to one account and all
> the mail for domain2.com to another account.  Here is a step-by-step of
> how I went about attempting this:
> 
> I used "./config," so all the virtual hosts on my machine were put into
> /var/qmail/control/locals and /var/qmail/control/rcpthosts with their 
> respective "www." hostnames (ie: it put www.domain1.com instead of 
> domain.com, which seems normal..I think).

Add domain1.com and domain2.com (without the www.) to control/rcpthosts.
Otherwise, you will not be able to receive mail for those domains via SMTP.
With your current setting, qmail will only accept mail for www.domain1.com
and www.domain2.com via SMTP.

control/locals should only contain dvp.deathvapor.org and deathvapor.org.
Remove everything else.

control/virtualdomains should contain:
domain1.com:user1
domain2.com:user2

Then restart qmail.

Then in user1's home directory, you need to have a .qmail-default file
containing delivery instructions. It will catch all mail for that domain.
Do the same for user2.

What basically happens is that when qmail sees a domain in virtualdomains,
it appends the recipient address to the username associated with that
virtualdomain and then treats it as local. In your case, when you send
email to [EMAIL PROTECTED], it becomes [EMAIL PROTECTED] and is treated
as local. qmail then looks in zach's home directory for a .qmail-test file
for delivery instructions. Delivery instructions are documented in man
dot-qmail.

> I put "domain1.com:zach" on one line of /var/qmail/virtualdomains, and I
> restarted qmail.  I sent a mail to "[EMAIL PROTECTED]" and got a returned
> mail.  It said:
> 
> --begin--
> 
> Hi. This is the qmail-send program at dvp.deathvapor.org.
> I'm afraid I wasn't able to deliver your message to the following
> addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
> 
> <[EMAIL PROTECTED]>:
> Sorry, no mailbox here by that name. (#5.1.1)
> 
> --- Below this line is a copy of the message.
> 
> Return-Path: <[EMAIL PROTECTED]>
> Received: (qmail 4333 invoked by uid 1000); 4 Mar 1999 05:39:00 -0000
> Delivered-To: [EMAIL PROTECTED]
> Received: (qmail 4330 invoked by uid 0); 4 Mar 1999 05:39:00 -0000
> Date: 4 Mar 1999 05:39:00 -0000
> Message-ID: <[EMAIL PROTECTED]>
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: test
> 
> test.
> 
> --end--

-- 
See complete headers for address, homepage and phone numbers

Reply via email to