Friday, July 26, 2019

bind - Apache2, Bind9, virtualhosts, subdomains and domain email

i'm running an ubuntu vps which hosts at least 2 different sites/domains via apache2's virtualhost, and they've been working fine for months. now i'm wondering about setting up some subdomains, and utilising email for the current domains i host.



i've read through posts and articles about setting up bind9, and even articles about how email actually works and it's journey from MTA to MTA( theres more to just clicking 'Send'), but my understanding is still a bit flaky here.




one of my questions is: linearly speaking, if i set up a sub-domain/sub-zone with my BIND9, assuming that it's currently installed but not running( no bind9 or named processes shown), will the bind9-DNS sever sit between my vps service provider's nameservers and my apache2-HTTP server?



example:
[ns1.serviceprovider.com] > [BIND9 DNS server] > [Apache2] > [sub.mydomain.com]



and not only do i have to create records for the new sub-domain/sub-zone, but also the necessary records for all of my current domains too?



my other question is: i know email is working on my server, as i can check and send via mail, but email both to and from outside the server doesn't( i assume it's only local mail for now).i did a dig mydowmain.com MX and it shows there is a MX record pointing to my servers ip, so why do i not receive an email i sent to postmaster@mydomain.com?




the user 'postmaster' doesn't exist, but in the aliases file it shows postmaster: root.



i appreciate any help you guys can give, and i know these questions seem a little noob, but we all started out as noobs at some point ;)

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...