You are misunderstanding the process for creating a "virtual domain" in
DNS.

mail.spiderplant.net is currently a CNAME for bonsai.spiderplant.net.
This requires EVERY mail server out their to do the rewrite of the address
as you are currently seeing.

What you need to do is the following:

1. remove the CNAME record completely.  It prevents you from doing the
setup correctly.

2. add an MX record for mail.spiderplant.net pointing at
bonsai.spiderplant.net.

BIND format:

mail.spiderplant.net. IN MX 10 bonsai.spiderplant.net.

3. add an A record for mail.spiderplant.net pointing to the IP address of
bonsai.spiderplant.net

BIND format:

mail.spiderplant.net.  IN A 213.133.64.85

DONE.  Do NOT add a PTR record.  The PTR for 213.133.64.85 should point to
bonsai.spiderplant.net and ONLY bonsai.spiderplant.net.

This should fix your problem provided you have qmail set up correctly.

On Fri, 18 Aug 2000, Dan Fairs wrote:

> 
> Hi,
> 
> Sorry to reply to my own message... but something's just struck me.
> Since qmail is receiving the message with what is basically an incorrect
> address, is it possible that the following sequence is happening:
> 
> 1) ISP's SMTP server gets an email addressed to
> [EMAIL PROTECTED]
> 2) It does a lookup for the MX record, and gets bonsai.spiderplant.net
> 3) It then rewrites that address as if it were addressed to a user on
> the MX server, hence sending a message to bonsai.spiderplant.net
> addressed to [EMAIL PROTECTED]
> 
> Why is this happening? You can see in the mail headers below that there
> is a trace of the original recipient:
> 
> > Received: from spiderplant.net (dyn212-ras7.screaming.net
> > [212.49.230.212])
> >         by smtp.screaming.net (8.9.3/8.9.3) with ESMTP id NAA01150
> >         for <[EMAIL PROTECTED]>; Fri, 18 Aug 2000 13:55:03 GMT
> 
> ... but then further down, the To: line actually reads:
> 
> > MIME-Version: 1.0
> > To: [EMAIL PROTECTED]
> > Subject: This is a test
> 
> What's going on? Is this a problem with my ISP's SMTP server, or is it
> something to do with the way my DNS is set up? 
> 
> As a related issue, does the MX record have to point to a canonical
> name? If it doesn't, and this 'rewriting' thing is happening, then I can
> get the MX record changed to point at mail.spiderplant.net and get that
> name registered as an alias for my mail server. If you can't, then I
> guess I'm gonna have to use an IP address for every domain I want to
> host. That can't be right, though... There are too many 'name-based'
> hosters out there.
> 
> Right, again, comment invited... ;)
> 
> Cheers,
> Dan
> 
> Dan Fairs wrote:
> > 
> > Hi there,
> > 
> > Apologies if this is a little simple, but I can't seem to find much in
> > the way of "if it doesn't work try this" type documentation. If there is
> > some, I'm more than happy to RTFM... just show me where the FM is... ;)
> > 
> > Essentially, the problem seems to be that mail sent to a user at the
> > virtual domain is recieved happily by my mail server, but bounces
> > because it arrives with the correct username but the 'real' host domain
> > name. Read on, and all will become clear.
> > 
> > OK.I've created a virtual domain mail.spiderplant.net. (Feel free to use
> > nslookup to check my MX setup - it should all be OK though, since mail
> > *does*  arrive.) I created the domain using
> > 
> > ./vadddomain mail.spiderplant.net
> > 
> > All fine, no errors. Then I did:
> > ./vadduser [EMAIL PROTECTED] test
> > 
> > Again, everything's fine. A du in ~vpopmail shows everything's created
> > properly:
> > [root@bonsai vpopmail]$ du
> > 10      ./etc
> > 483     ./bin
> > 1       ./users
> > 1       ./domains/mail.spiderplant.net/postmaster/Maildir/cur
> > 1       ./domains/mail.spiderplant.net/postmaster/Maildir/new
> > 1       ./domains/mail.spiderplant.net/postmaster/Maildir/tmp
> > 5       ./domains/mail.spiderplant.net/postmaster/Maildir
> > 6       ./domains/mail.spiderplant.net/postmaster
> > 1       ./domains/mail.spiderplant.net/test/Maildir/cur
> > 1       ./domains/mail.spiderplant.net/test/Maildir/new
> > 1       ./domains/mail.spiderplant.net/test/Maildir/tmp
> > 5       ./domains/mail.spiderplant.net/test/Maildir
> > 6       ./domains/mail.spiderplant.net/test
> > 19      ./domains/mail.spiderplant.net
> > 20      ./domains
> > 137     ./lib
> > 13      ./include
> > 33      ./doc/man_html
> > 26      ./doc/doc_html
> > 60      ./doc
> > 734     .
> > 
> > Now, upon trying to send a message to [EMAIL PROTECTED] I get:
> > 
> > This is a permanent error; I've given up. Sorry it didn't work out.
> > 
> > [qmail message trimmed]
> > 
> > <[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 97290 invoked from network); 18 Aug 2000 13:52:25 -0000
> > Received: from smtp.screaming.net (212.49.224.20)
> >   by bonsai.spiderplant.net with SMTP; 18 Aug 2000 13:52:25 -0000
> > Received: from spiderplant.net (dyn212-ras7.screaming.net
> > [212.49.230.212])
> >         by smtp.screaming.net (8.9.3/8.9.3) with ESMTP id NAA01150
> >         for <[EMAIL PROTECTED]>; Fri, 18 Aug 2000 13:55:03 GMT
> > Sender: [EMAIL PROTECTED]
> > Message-ID: <[EMAIL PROTECTED]>
> > Date: Fri, 18 Aug 2000 14:52:53 +0100
> > From: Dan Fairs <[EMAIL PROTECTED]>
> > X-Mailer: Mozilla 4.73 [en] (X11; I; Linux 2.2.14-5.0 i686)
> > X-Accept-Language: en
> > MIME-Version: 1.0
> > To: [EMAIL PROTECTED]
> > Subject: This is a test
> > Content-Type: text/plain; charset=us-ascii
> > Content-Transfer-Encoding: 7bit
> > 
> > This is a test mail after a restart of qmail
> > 
> > [end]
> > 
> > Why is this happening? Is it something to do with the fact that
> > spiderplant.net is a 'real' domain and mail.spiderplant.net is not? Is
> > there an issue with the ordering of names in the control files? In fact,
> > here are my /var/qmail/control/rcpthosts, virtualdomains and locals:
> > 
> > [rcpthosts]
> > localhost
> > bonsai.spiderplant.net
> > spiderplant.net
> > btclick.com
> > screaming.net
> > mail.spiderplant.net
> > 
> > [virtualdomains]
> > mail.spiderplant.net:mail.spiderplant.net
> > 
> > [locals]
> > localhost
> > bonsai.spiderplant.net
> > spiderplant.net
> > 
> > I believe it's correct for the virtual domain not to be listed in
> > locals; is this correct?
> > 
> > Finally, the qmail log shows what you'd expect given the mail I
> > received:
> > 
> > @40000000399d3fa408ef029c new msg 6582
> > @40000000399d3fa409237464 info msg 6582: bytes 944 from
> > <[EMAIL PROTECTED]> qp 97290 uid 1010
> > @40000000399d3fa40b05e064 starting delivery 1: msg 6582 to local
> > [EMAIL PROTECTED]
> > @40000000399d3fa40b19c624 status: local 1/10 remote 0/20
> > @40000000399d3fa41030b8d4 delivery 1: failure:
> > Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/
> > @40000000399d3fa4111b4f84 status: local 0/10 remote 0/20
> > @40000000399d3fa414dd1e2c bounce msg 6582 qp 97293
> > @40000000399d3fa4154d25dc end msg 6582
> > 
> > Advice and ideas are *greatly* appreciated...
> > 
> > Many thanks,
> > Dan
> > 
> > --
> > Daniel Fairs                   [EMAIL PROTECTED]
> > System Administrator           +44 (0) 7881 922949
> > spiderplant.net
> 
> -- 
> Daniel Fairs                   [EMAIL PROTECTED]
> System Administrator           +44 (0) 7881 922949 
> spiderplant.net
> 

---------------------------------
Timothy L. Mayo                         mailto:[EMAIL PROTECTED]
Senior Systems Administrator
localconnect(sm)
http://www.localconnect.net/

The National Business Network Inc.      http://www.nb.net/
One Monroeville Center, Suite 850
Monroeville, PA  15146
(412) 810-8888 Phone
(412) 810-8886 Fax

Reply via email to