We're setting up a system where each of our users gets their own subdomain of companymail.com
for sending / receiving emails, and they can set up multiple mailboxes under that subdomain. We also want to allow them to use their own domain. E.g.:
Main domain: companymail.com
.
User 1 has two mailboxes set up:
mail@user1.companymail.com
support@user1.companymail.com
User 2 has one mailbox set up:
mail@user2.companymail.com
We've set up a single GMail inbox and have routed all incoming mail to <anything>@<anything>.companymail.com
into it, and can successfully pull it into our system from there by adding DNS MX records for:
companymail.com -> aspmx.l.google.com
*.companymail.com -> aspmx.l.google.com
(plus the other altX.aspmx.l.google.com ones)
For receiving on their own domain, they'll need to forward their mail to their appropriate mailbox. E.g. User 1 would need to set up mail forwarding on their domain to mail@user1.companymail.com
. They'll also need to add SPF and DKIM records to their domain. I think this should all work fine as it's currently set up.
We're now trying to sort out sending. This is where the question of how to set up the reverse DNS comes up. Our next steps are:
- Set up a local instance of postfix to send outgoing emails and bind it to its own public IP, as the servers we're running
companymail.com
on (which is our dedicated email domain) are the same as the servers we're runningcompany.com
on. - Once that's set up, then we can set up reverse DNS to point our dedicated IP to our domain.
The question is how would we handle subdomains for the reverse DNS entry? Do we just point it to our main companymail.com
domain?