HOST | type | value
@ | A | 184.108.40.206
@ | AAAA | 2222:2222:2222:2222:2222:2222
@ | MX | server2.com priority=10
The thing is, I would like to continue to use Namecheap’s DNS server for my records, so changing the glue/nameserver record to my MIAB server isn’t something I want. I also cannot change the A/AAAA record for server2.com, as that would not allow the webserver to be a webserver.
The most confusing part is that in the MIAB control panel, under System > External DNS > server2.com there are two entries that are confusing:
In the configuration that you have described, you would ignore the A record for server2.com as DNS is being handled by NameCheap. IF you were using MiaB for DNS you would need to set a Custom DNS entry for the A and AAAA records on server2.com as MiaB assumes that you are hosting the web page on its web server (server 1) unless you tell it otherwise. You are seeing 220.127.116.11 because you have not told MiaB otherwise.
The SPF record is saying that a recipient should only consider mail coming from the MX record for this domain (server 1) as being valid. If mail is received from a different IP address then it fails the SPF check. The receiving mail server would then process the mail as it is configured to (spam, delete, deliver). The SPF record in itself does not ‘allow’ mail to be sent from a server … it’s purpose is to identify WHICH servers the domain owner considers to be a valid server for sending mail from their domain.
IF you are sending mail through SMTP from server 2 (your phpBB?), the mail is actually considered to be sent from server 1. Think of server 2 as being a Thunderbird email client … you compose an email and click send. Thunderbird then connects to the mail server, authenticates, and sends the mail. The exact same thing is happening here, your email client (phpBB) is connecting to the mail server, authenticating, and sending the mail from server1.