LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Libranet (http://www.linuxquestions.org/questions/libranet-34/)
-   -   DNS Configuration (http://www.linuxquestions.org/questions/libranet-34/dns-configuration-111716/)

anibiswas 11-02-2003 11:56 PM

DNS Configuration
 
I have a domain like mydomain.com and a virtual host domain as something.mydomain.com with an IP.

My objective is that I want to send all mails directed to *.something.mydomain.com (eg xxx@yahoo.com.aa.bb.something.mydomain.com)
to a user say root in something.mydomain.com. I mean all mails coming in *.something.mydomain.com should be redirected to root@something.mydomain.com.

something.mydomain.com is also my mail server.

I am using Red Hat Linux with Bind .

I have created zone file like mydomain.com.zone in /var/named with
an wildcard Mx Entry and A record. and also pointed this file in named.conf.

But it is not working .

My zone file looks like this :


@ IN SOA ns1.mydomain.com. root.mydomain.com. (
2003080801 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ; default_ttl
)
;name server
IN NS ns1.mydomain.com.
IN NS ns2.mydomain.com.

;mail server

*.mydomain.com. IN MX 10 someone.mydomain.com

;public server

ns1.mydomain.com IN A ip- of- primary name- server
ns2.mydomain.com IN A ip- of- slave name- server
www IN A ip- of- mail- server
ftp IN A ip- of- mail- server
mail IN A ip- of- mail- server

;end


# Now I have written in named.conf file
zone "vpscenter.com"{
type master;
file "vpscenter.com.zone";
allow-transfer { ip- of- slave name- server

};

I have started named dameon.
but I am not getting the desired result.

when I sending any mail at say root@xx.yy.something.mydomain.com

It is showing Host unknown.

am I missing something?

Please advice me with detailed steps, all necessary configurations and sample code ( zone files etc) ASAP.

Thanks

tocodilon 11-03-2003 12:14 AM

Re: DNS Configuration
 
In the zone file for your virtual domain, make it similar to this:

############

$TTL 86400
$ORIGIN com.
myvirtualdomain IN SOA ns.myvirtualdomain.com. root.ns.myvirtualdomain.com. (
2003013118 ; Serial
7200 ; Refresh
1800 ; Retry
3600000 ; Expire
7200 ; Minimum
)
; Nameservers
NS ns.myprimarynameserver.com.
NS ns.mysecondarynameserver.com.

;
; Mail Exchanger MX
MX 10 mail.myvirtualdomain.com.
A 203.111.122.23
;
$ORIGIN myvirtualdomain.com.
ns A 203.111.122.23
mail CNAME ns.myvirtualdomain.com.
www CNAME ns.myvirtualdomain.com.
pop3 CNAME mail.myvirtualdomain.com.
smtp CNAME mail.myvirtualdomain.com.
ftp CNAME mail.myvirtualdomain.com.

#############
Note: assume that the IP for your virtual domain is 203.111.122.23
#############


In the /etc/mail/virtusertable add this line:

$1@myvirtualdomain.com root@myvirtualdomain.com

so that all mails will go to root mailbox.


Let me know if this works.



Quote:

Originally posted by anibiswas
I have a domain like mydomain.com and a virtual host domain as something.mydomain.com with an IP.

My objective is that I want to send all mails directed to *.something.mydomain.com (eg xxx@yahoo.com.aa.bb.something.mydomain.com)
to a user say root in something.mydomain.com. I mean all mails coming in *.something.mydomain.com should be redirected to root@something.mydomain.com.

something.mydomain.com is also my mail server.

I am using Red Hat Linux with Bind .

I have created zone file like mydomain.com.zone in /var/named with
an wildcard Mx Entry and A record. and also pointed this file in named.conf.

But it is not working .

My zone file looks like this :


@ IN SOA ns1.mydomain.com. root.mydomain.com. (
2003080801 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ; default_ttl
)
;name server
IN NS ns1.mydomain.com.
IN NS ns2.mydomain.com.

;mail server

*.mydomain.com. IN MX 10 someone.mydomain.com

;public server

ns1.mydomain.com IN A ip- of- primary name- server
ns2.mydomain.com IN A ip- of- slave name- server
www IN A ip- of- mail- server
ftp IN A ip- of- mail- server
mail IN A ip- of- mail- server

;end


# Now I have written in named.conf file
zone "vpscenter.com"{
type master;
file "vpscenter.com.zone";
allow-transfer { ip- of- slave name- server

};

I have started named dameon.
but I am not getting the desired result.

when I sending any mail at say root@xx.yy.something.mydomain.com

It is showing Host unknown.

am I missing something?

Please advice me with detailed steps, all necessary configurations and sample code ( zone files etc) ASAP.

Thanks


anibiswas 11-03-2003 12:42 AM

thanks for ur quick reply...

but I want that I will type xxx@yyy.com.zzz.myvirtualdomain.com

and the email should be forwarded to root@myvirtualdomain.com

Which means in general i will type *.myvirtualdomain.com and it will resovle the IP of myvirtualdomain.com

can u please help.....

Greg Dolley 03-15-2004 08:56 PM

Quote:

Originally posted by anibiswas
thanks for ur quick reply...

but I want that I will type xxx@yyy.com.zzz.myvirtualdomain.com

and the email should be forwarded to root@myvirtualdomain.com

Which means in general i will type *.myvirtualdomain.com and it will resovle the IP of myvirtualdomain.com

can u please help.....

The reason it's not working is because you don't authoritative rights to the domain "vpscenter.com" Obviously, only VPS Center has that authority.

But I believe what you're trying to do is setup a "catch-all" email box. If you are, then you definitely don't have to go through all this. You just need to update the "/etc/aliases" file and make the user "root" go to your designated catch-all email box.

Or, if you're using the HSPComplete control panel, you can do it through there under the "mailboxes" button in the "Site" or "System" tab.

Hope this helps! :-)


All times are GMT -5. The time now is 07:51 AM.