I am working on a system where we have Moodle software on one domain (I'll call it moodlehost.com) which is making a LOGIN connection to a SMTP server on another domain (I'll call it smtphost.com). I was brought in to work on the Moodle side of things, but I've ended up going some DNS work too, though I'm not an expert on DNS or server admin.
I have the Moodle software on moodlehost.com logging into the SMTP server on smtphost.com, with SPF on smtphost.com configured to approve email from the moodlehost.com IP. It's working nicely and passing all spam-filter checks with flying colors. Note: The MX for smtphost.com is a mail server which I'll call underlyingsmtp.com.
** Edit per request from Tim below: To establish a connection to the SMTP server from Moodle, I type in smtphost.com with port 587. However, the MX record for smtphost.com points to a different mail server, underlyingsmtp.com. (Now that you ask about it, I recall that the MX is only for INCOMING mail, right? So the MX record for smtphost.com would be irrelevant to outgoing mail sent through smtphost.com? In that case, my question is the same: Why would I point the MX record for moodlehost.com at the same address as the MX record on smtphost.com?)
The system admin who runs the system I'm working on wants me to set MX records on moodlehost.com so they point to underlyingsmtp.com, even though moodlehost.com doesn't exist on that server and any incoming mail @moodlehost.com bounces as a result. His explanation is "Mixing the sends is (mostly) where a backlisting can possibly occur. All or nothing is best with forwarded mail, that's all."
Again, I'm not a server guy, but this doesn't make any sense to me. As soon as moodlehost.com hands off the outgoing mail to the SMTP server on smtphost.com it's out of the picture, and the outgoing emails are all passing SPF, DKIM, and DMARC. I don't see how pointing the moodlehost.com MX at underlyingsmtp.com helps, and it actually seems like it might look suspicious if we're pointing MX at a mail server where we don't have an account so any incoming mail bounces.
Could anyone help me understand if pointing the MX at underlyingsmtp.com makes sense, and if so, why? Thanks very much for your time.
** Edit: We don't anticipate having any incoming mail to moodlehost.com, but if we do it certainly can't and won't be handled by underlyingsmtp.com. The server that HAS been handling incoming mail is moodlehost.com. It's the only one that would do so. If we point the MX records elsewhere, mail will simply bounce.
My question is this: If I have a script on site A making an SMTP connection to server B in order to send mail, is there any reason why site A's MX records would also need to point to server B?