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