1
Outbound Ipv4 Configuration
Question asked by Matt Lyons - 10/11/2022 at 10:53 PM
Unanswered
I am hosting SM on an Azure VM. I have added a second IP address and it's private IP address is listed in the domains Outbound IPv4 dropdown (along with the primary IP address's private IP). I select the secondary IP address under the domain configuration and I under the server Settings, Protocols, SMTP Out, Outbound IPv4 I have "Use the Domain's IP" selected. But when I send email from this domain I still see the primary IP address in the received email's headers. Anyone know what else I am missing?

5 Replies

Reply to Thread
0
Zach Sylvester Replied
Employee Post
Hey Matt, 

It sounds like you might need to do a couple of things. 
  1. Make sure that port 25 is open on that IP. 
  2. Make sure that port 25 is selected for that IP in Settings->Bindings->ports

If both of these things are true you can try rebooting the server to reset the NIC. 

Please let me know if this helps. 

Kind Regards, 
Zach Sylvester Software Developer SmarterTools Inc. www.smartertools.com
0
Matt Lyons Replied
Thanks Zach,

Port 25 is open for Any source and destination in the firewall. And IP address also checked for port 25.

I found this in the logs so I think this means the problem is probably with the Azure IP configuration:

[2022.10.12] 05:10:01.812 [55057213] Initiating connection to 74.125.137.27
[2022.10.12] 05:10:01.812 [55057213] Connecting to 74.125.137.27:25 (Id: 1)
[2022.10.12] 05:10:01.812 [55057213] Binding to local IP 10.0.2.5 (Id: 1)
[2022.10.12] 05:10:01.812 [55057213] Exception connecting to 74.125.137.27 (Id: 1)
[2022.10.12] 05:10:01.812 [55057213] System.Exception: Exception: Connection failed
[2022.10.12]    at MailService.RelayServer.Clients.SMTP.ClientConnectionSync.Connect(Int32 connectionId, Int32 timeout)05:10:01.812 [55057213] Previous connection attempt failed. Attempting again with primary local ip.
[2022.10.12] 05:10:01.812 [55057213] Connecting to 74.125.137.27:25 (Id: 2)
[2022.10.12] 05:10:01.828 [55057213] Connection to 74.125.137.27:25 from 10.0.2.4:52044 succeeded (Id: 2)
[2022.10.12] 05:10:02.062 [55057213] RSP: 220 mx.google.com ESMTP n8-20020a63b448000000b0045c88c3b799si17066466pgu.709 - gsmtp
 
Now I see that the new NIC says "No network access" and it is missing a default gateway. 

I will poke around the Azure settings and reboot the server later tonight.

Thanks for the suggestions. 
0
Matt Lyons Replied
UPDATE: I was able to add a default gateway on the second NIC by running a "route" command at the dos prompt. The second public IP address can now be used for the Outbound IP.

I got the route command from this page:
(this was really hard to find.)
1
Matt Lyons Replied
UPDATE 2: The default Outbound IPv4 setting is Automatic. This means that as soon as you add a second IP address SmarterMail can, and did for me, start using that IP address immediately. I had added a PTR record for this IP address but it hadn't propagated yet so I got lots of bounced emails due to untrusted IP address.

Here are the instructions for adding a PTR record for Azure IP address (note you have to use PowerShell): 
0
Tony Scholz Replied
Employee Post
Thanks for the update Matt, I am glad that you were able to get this resolved. 
Tony Scholz System/Network Administrator SmarterTools Inc. www.smartertools.com

Reply to Thread