I've installed and configured Exchange 2010 on Server 2012 functionally enough that I can send email between boxes on the local server.
For what it's worth, I'm doing this as a test-run in a virtual environment before I replicate this for production, so I'm currently running the OS on VirtualBox with 1 bridged NIC getting internet access and 1 host-only NIC providing DHCP and such to a W7 VM I'm using to test connectivity. Windows Firewall is currently disabled.
The issue I'm having is sending email to external addresses. In this particular test case I'm trying to use a Gmail address as the target, but I encounter similar problems with Bellsouth as well. They all result in the error message of "451 4.4.0 Primary target IP address responded with: “421 4.2.1 Unable to connect.” Attempted failover to alternate host, but that did not succeed. Either there are no alternate hosts, or delivery failed to all alternate hosts."
I set up a CNAME of "mail" that points to "bluebox.amberjohn.co", and in my send connector "mail.amberjohn.co" is the FQDN given in response to HELO. "mx.amberjohn.co" also points to "bluebox.amberjohn.co". SMTP address space is "*" and includes all subdomains.
Now, where I think I may be going wrong is here: I installed SMTP server through the Add Roles and Features wizard. I configured that to deliver mail to SMTP server "localhost" at port 25, using Windows authentication credentials. This doesn't sound right to me but I'm not sure where else to point it, as I'm trying to run an SMTP server in-house.
The idea here is that I can't use my ISP's SMTP server because they rewrite the email headers based on whose credentials are used to authenticate (combats spoofing, I assume). I have 5 users in the organization, and their emails need to maintain their own authorship. So I'm thinking I'll just run my own SMTP server, but something about how I've set this up makes it seem like it's just a big loop.
I tried SMTPDiag but it always fails when looking up MX records for the target, and this appears to be because it's hard-coded to use port 25 when every SMTP server nowadays requires TLS/SSL on 587 or so. It's finding the MX records, it just won't connect. SMTPDiag works fine if I point it to and from a local address, since my server runs on 25.
The only thing I can think of that I haven't tried is opening ports on my hardware firewall, but I'm not yet convinced that it's an issue. Maybe I'm wrong?
I'd appreciate your input.